By default "Add to favorites" link it appear both in the sidebar (on Item Action) and under the Items and Album thumbnails
I want that the "Add to favorites" only appear in the sidebar and only for items (not albums).
I want that the "Add to favorites" only appear in the sidebar
Try adding this after line 130 (I haven't tested it):
if (!isset($wantsDetailedLinks[$item->getId()])) {
continue;
}
eliz82
Joined: 2009-11-06
Posts: 71
Posted: Thu, 2010-06-10 10:23
on a quick testing both seems to be working without problems.
i saw in the comment of module.inc that you are the developer of this module, and i want to tell you about another strange problem that i experience with this module.
i have the gallery2 integrated in phpbb3 . phpbb3 has some special accounts by default created for the spiders/bots. when synchronize the users between gallery and phpbb3, those accounts are also created in gallery2 and they seems that every time when they try to index the gallery, they follow "Add to favorite" link and they add those Items to their favorites list.
is there any method that "add to favorites" link to not appear to users that have a specific string in they username (for example "[Bot]" or [Spider] ) or certain user ids ?
this are the spiders that is seems to be active in my phpbb3
Yahoo [Bot]
Google [Bot]
MSN [Bot]
Baidu [Spider]
Google Feedfetcher
Majestic-12 [Bot]
MSNbot Media
Ask Jeeves [Bot]
Alexa [Bot]
Exabot [Bot]
Gigabot [Bot]
Voyager [Bot]
Yahoo MMCrawler [Bot]
Heritrix [Crawler]
Steeler [Crawler]
alecmyers
Joined: 2006-08-01
Posts: 4342
Posted: Thu, 2010-06-10 10:29
You could write a test for the user name in that same section of code, and exit the loop with a "continue" statement along the same lines. Good Luck!
suprsidr
Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2010-06-10 10:56
Quote:
when synchronize the users between gallery and phpbb3, those accounts are also created in gallery2
if you remove "those accounts" from gallery they will be treated like guests
Posts: 4342
Uncomment module.inc lines 127-130:
Try adding this after line 130 (I haven't tested it):
Posts: 71
on a quick testing both seems to be working without problems.
i saw in the comment of module.inc that you are the developer of this module, and i want to tell you about another strange problem that i experience with this module.
i have the gallery2 integrated in phpbb3 . phpbb3 has some special accounts by default created for the spiders/bots. when synchronize the users between gallery and phpbb3, those accounts are also created in gallery2 and they seems that every time when they try to index the gallery, they follow "Add to favorite" link and they add those Items to their favorites list.
is there any method that "add to favorites" link to not appear to users that have a specific string in they username (for example "[Bot]" or [Spider] ) or certain user ids ?
Posts: 4342
You could write a test for the user name in that same section of code, and exit the loop with a "continue" statement along the same lines. Good Luck!
Posts: 8339
if you remove "those accounts" from gallery they will be treated like guests
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 27300
I guess Yahoo likes your items more than any other bot.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team