FrontEndUsers and CustomContent <ul><li>Introduction
Installation
Setting up properties, groups and users
Simple content work
Slightly more advanced template work
Extensions, interoperability and API </li></ul>
FrontEndUsers and CustomContent Introduction FrontEndUsers (FEU) <ul><li>Manages users,  groups and userproperties
Allows users to log in and out
Allows users to edit allowed properties </li></ul>CustomContent (CC) <ul><li>Sets up smarty access to FEU-status of visito...
FrontEndUsers and CustomContent Installation <ul><li>Easy installation using ModuleManager or FTP
Dependencies: FEU ← CC </li></ul>
Upcoming SlideShare
Loading in …5
×

Geek Moot '09 -- FrontendUsers/CustomContent

3,604 views
3,445 views

Published on

Presentation on implementing FrontendUsers and CustomContent. Presented by: Morten Poulsen.

Published in: Technology, Business
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,604
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
30
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Geek Moot '09 -- FrontendUsers/CustomContent

  1. 1. FrontEndUsers and CustomContent <ul><li>Introduction
  2. 2. Installation
  3. 3. Setting up properties, groups and users
  4. 4. Simple content work
  5. 5. Slightly more advanced template work
  6. 6. Extensions, interoperability and API </li></ul>
  7. 7. FrontEndUsers and CustomContent Introduction FrontEndUsers (FEU) <ul><li>Manages users, groups and userproperties
  8. 8. Allows users to log in and out
  9. 9. Allows users to edit allowed properties </li></ul>CustomContent (CC) <ul><li>Sets up smarty access to FEU-status of visitor </li></ul>
  10. 10. FrontEndUsers and CustomContent Installation <ul><li>Easy installation using ModuleManager or FTP
  11. 11. Dependencies: FEU ← CC </li></ul>
  12. 12. FrontEndUsers and CustomContent Setting up FrontEndUsers <ul><li>Set up order: properties -> group(s) -> user
  13. 13. Ease ↔ flexibility
  14. 14. At least one property needed, email there by default
  15. 15. Properties can be user-editable, read-only etc.
  16. 16. Users can be members of several groups, FEU handles props nicely </li></ul>
  17. 17. FrontEndUsers and CustomContent Simple content work <ul><li>Calling the module
  18. 18. Using the $ccuser smarty object
  19. 19. Cache-control on CC pages
  20. 20. WYSIWYG's kills stuff </li></ul>{cms_module module='CustomContent'} {if !$ccuser->loggedin()} You are not logged in.<br/> Please do so now. {FrontEndUsers form='login'} {else} You have entered the secret area. You are know as {$ccuser->property('name')} {/if} Code Examples
  21. 21. FrontEndUsers and CustomContent Advanced template work 1 - statusheader <ul><li>Showing statusheader
  22. 22. Do hidden pages for login and logout </li></ul>{cms_module module='CustomContent'} {if !$ccuser->loggedin()} <a href='index.php?page=login'> Login </a> {else} You are logged in as {$ccuser->property('name')} <a href='index.php?page=logout'> Logout </a> {/if} Code Examples {FrontEndUsers form='login'} {FrontEndUsers form='login' returnto='secret'} {FrontEndUsers form='logout' returnto='home'}
  23. 23. FrontEndUsers and CustomContent Advanced template work 2 – using extrafields <ul><li>Setting the extra field
  24. 24. Checking the extra field in the template
  25. 25. Cache control -> off </li></ul>{if $content_obj->mProperties-> mPropertyValues.extra1=='topsecret'} {cms_module module='CustomContent'} {if !$ccuser->loggedin()} You have reached a topsecret page and you are not logged in {else} {content} {/if} {else} {content} {/if} Code Examples
  26. 26. FrontEndUsers and CustomContent Advanced template work 3 – hiding pages in menus <ul><li>Modifying the {menu-tag}
  27. 27. Accessing the extra field in menu template </li></ul>{cms_module module=CustomContent} {foreach from=$nodelist item=node} {if $node->extra1!='topsecret' || $ccuser->loggedin()} <a href=&quot;{$node->url}&quot;> {$node->menutext} </a> {/if} {/foreach} Code Examples {menu loadprops='1'}
  28. 28. FrontEndUsers and CustomContent Other interesting $ccuser-functions Testing for groupmembership {cms_module module=CustomContent} {if $ccuser->loggedin() && $ccuser->memberof('geekmoot')} Wow, you are the proud member of The GeekMoot group {/if} Code Examples Testing for IP-addr {cms_module module=CustomContent} {if $ccuser->loggedin() && $ccuser ->ipmatches('192.168.0.0/24')} You are even a local user {/if} More functions on the CC help page
  29. 29. FrontEndUsers and CustomContent Modules extending/using FEU functionality <ul>Extending FEU: <li>Selfreg – allowing users to register themselves
  30. 30. FEUserEdit – a bit easier editing for simple setups
  31. 31. FrontEndUser mailer – mail FEU groups
  32. 32. Using FEU:
  33. 33. ForumMS, eCommerce-suites, Download Manager and a lot of others </li></ul>
  34. 34. FrontEndUsers and CustomContent Using FEU from other modules <ul><li>Very few lines of code needed
  35. 35. Extensive API
  36. 36. API not documented
  37. 37. Check API section of FrontEndUsers.module.php </li></ul>Function CheckLogin() { $FEU=$this->GetModuleInstance( 'FrontEndUsers'); if ($FEU) { return $FEU->LoggedIn(); } //FrontEndUsers not installed return false; } Code Examples

×