Adding the actions from a tab in the index

Started by nax_hh, July 11, 2009, 05:50:27 AM

Previous topic - Next topic

nax_hh

hi guys, this is my first modification for a smf forum and i have doubts..

I can modify the tabs withouth problems.. then i see this (http://docs.simplemachines.org/index.php?topic=564) and i fix my code correctly.

My idea is add a tab to "favorites" when the people is in a topic can add this from a favorites fold o something else...

i have added the buttons to add favorites and see favorites.. but i don't know how to work with the actions.

i edit the index.php to add a value in the array:


'.xml' => array('News.php', 'ShowXmlFeed'),
'favorites' => array ('favorites.php', 'Favorites'),
);


i add the last line.
and if i do copy paste of PersonalMessage.php from /Sources and i rename it from favorites.php. it work correctly and load the PM with the 'Favorites' action.

but now, i want to do a page for the favorites.

it will be very simply but i need to understand the mechanism of all smf.

it is for wat i need your help.

The favorites tab will be a query for a table who haves iduser,idtopic,link topic
it display all of the favorites added and you can delete anyone...
nothing else...

the add favorites button will be a update query to add the user id, idtopic, and the link of topic viewing

i will be grateful if any of you can help.

pd. i'm working with default template now and smf 1.1.9.
thnks
nax

ianus

Greetings!

Nice idea...
You maybe want to have a look at this mod: Bookmarks

Imho this offers the same functionality

nax_hh

thnks but, it is for 1.1.9

my forum have 2.0 rc1-1

and i tring to do one for it :P

thanks.


[SiNaN]

Well, you need to load/update stuff in Favorites.php. Also load the template to display the data.

However, your question sounds a bit general than we can provide some exact codes/directions. If you require assistance with a specific issue, we would be glad to help.

If you have little to no experience in coding, I suggest that you make a request in Mod Requests board for this or ask the author of 1.1.9 mod to update it to SMF 2.0 version. If you have some experience in coding, cheating from SMF source code will help you a lot.
Former SMF Core Developer | My Mods | SimplePortal

Advertisement: