Startseite Beiträge von Heute Kalender Boardsuche Benutzerliste FAQ Deine Einstellungen ändern Neue Beiträge
Navigation
Go Back   Mambo / Joomla Hosting Talk (MHT/JHT) > General Forums > jh* Projects
User Name
Password
Reply
 
Thread Tools Display Modes

  #1  
Old 09-16-2006, 09:13 PM
ruizit0 ruizit0 is offline
Junior Member
 
Join Date: Sep 2006
Posts: 4
Default making this only to registered users

is possible to make this component to work only with registered users ?

i think this is very usefull .. i think this is the only component to do this function ... very usefull but with some lack of options .. and the most important i think is to limit it only to registered options ...

i want to use it .. but how can i make that change ? i dont want anonymous to mantain a favorit list
Reply With Quote
  #2  
Old 09-16-2006, 11:14 PM
keliix06 keliix06 is offline
Administrator
 
Join Date: Mar 2005
Location: Minneapolis, MN
Posts: 394
Default

Only registered users can maintain and view a favorites list, but I do believe the bot will show the link even if they aren't logged in. Add a feature request over at Joomla Forge and I'll work it into a future release.
__________________
Doyle Lewis - BuyHTTP Internet Services
keliix06 [at] gmail.com
Reply With Quote
  #3  
Old 09-17-2006, 12:57 PM
ruizit0 ruizit0 is offline
Junior Member
 
Join Date: Sep 2006
Posts: 4
Default

hum ok... but isnt possible to make a quick code like like:

Code:
$_MAMBOTS->registerFunction( 'onAfterDisplayContent', 'mhFavorites' ); function mhFavorites( &$row ) { global $Itemid; $text = '<br /><a href="'.sefRelToAbs("index.php?option=com_mhfavorites&task=add&id=$row->id&Itemid=$Itemid").'">Add this article to your favorites</a>'; echo $text; } ?>
put an if in the bot something like:

"if { user isnt registered { return ;0"
or
"if { user isnt registered { javapop "you must be registered to add a favorite" { return;0"

sorry i dont understand php to much and i dont know the joomla vars :|
isnt possible to some quick code like that to the bot .. so unregistered users get some reply to register first?

thanks
Reply With Quote
  #4  
Old 09-17-2006, 01:09 PM
ruizit0 ruizit0 is offline
Junior Member
 
Join Date: Sep 2006
Posts: 4
Default

hum.. found a solution ... make the mabot only to registered
Reply With Quote
  #5  
Old 09-17-2006, 03:02 PM
keliix06 keliix06 is offline
Administrator
 
Join Date: Mar 2005
Location: Minneapolis, MN
Posts: 394
Default

Forgot about the easy solution. Yes, that should do it.

For the next release I will change it to only display for registered by default. You can use the following code:

Code:
function mhFavorites( &$row ) { global $Itemid, $my; if($my->id) { $text = '<br /><a href="'.sefRelToAbs("index.php?option=com_mhfavorites&task=add&id=$row->id&Itemid=$Itemid").'">Add this article to your favorites</a>'; echo $text; } } ?>
__________________
Doyle Lewis - BuyHTTP Internet Services
keliix06 [at] gmail.com
Reply With Quote
  #6  
Old 09-17-2006, 03:42 PM
ruizit0 ruizit0 is offline
Junior Member
 
Join Date: Sep 2006
Posts: 4
Default

ehehe thanks .. works perfect
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:24 AM.

Home . Members . FAQ . User CP . New Posts . Today's Posts . Media Kit
 
Joomla Top Sites - Your Primary Source of Joomla Traffic
Web Hosting . Mambo Tutorials . Joomla Hosting . Mambo Hosting . Joomla Top Sites . Joomla Advertising . Web Hosting Flash Tutorials . Joomla & Mambo Freelancers . Joomla Template Providers
Powered by vBulletin - Based on design by vbdesigns.de - © 2005 - 2006 by BuyHTTP Internet Services
Top Top
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.