Notifications
Clear all

Add Favourite Story

3 Posts
2 Users
0 Reactions
1,161 Views
(@michelle)
Posts: 106
Estimable Member
Topic starter
 

A quick question: I want only the "Add Story to Favourites" to come up within a story (in storyindex.tpl und viewstory.tpl), but addtofaves brings up both "Add Author" and "Add Story". Is there a tag only for the "Add Story to Favourites" feature? I can't find anything:(


 
Posted : 17/03/2010 6:10 pm
(@lyndsie)
Posts: 1263
Member Moderator
 

From includes/storyblock.php (line 89):


$tpl->assign("addtofaves", "[<a href="""._BASEDIR."user.php?action=favst&amp;add=1&amp;sid=".$stories['sid'"]."">"._ADDSTORY2FAVES."</a>] [<a href="""._BASEDIR."user.php?action=favau&amp;add=".$stories['uid'"].(count($stories['coauthors']) ? ",".implode(",", array_keys($stories['coauthors'])) : "")."">"._ADDAUTHOR2FAVES."</a>]");

In other words, I don't think so. If they were broken out, it would probably be there. However you could add something like:


$tpl->assign("addonlystory", "[<a href="""._BASEDIR."user.php?action=favst&amp;add=1&amp;sid=".$stories['sid'"]."">"._ADDSTORY2FAVES."</a>]");

Then the variable would be {addonlystory}. To change the text of the link you'd have to change _ADDSTORY2FAVES in languages/en.php.


 
Posted : 17/03/2010 7:47 pm
(@michelle)
Posts: 106
Estimable Member
Topic starter
 

That seems to work! Thanks for the suggestion!


 
Posted : 18/03/2010 3:10 pm
Share: