News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Get topic ID\'s

Started by Carlos Gandra, November 15, 2008, 10:47:47 PM

Previous topic - Next topic

Carlos Gandra

Hi there,

Need some help in coding. There's a conflict between Bookmark mod and Pretty URL's, because $context['current_topic'] isn't identifying what topic ID the Bookmark mod should add. I'll give you an example:

- /topic-pretty-name/?action=bookmarks;sa=add (fail)
-
/index.php?action=bookmarks;sa=add;topic=XXX.0 (works)

Bu
t $context['current_topic'] only do the first option, which fails... how can I change it to make the mod identify not the names but the ID's?

Thanks a lot,
Regards from Portugal
Carlos Gandra
Mundo dos Animais

[SiNaN]

I guess you are using Aaron's Bookmarks mod.

Try this:

Bookmarks.php

Find:

switch ($context['sub_action'])

Replace:

if (!empty($_REQUEST['booktopic']))
$_REQUEST['topic'] = $_REQUEST['booktopic'];

switch ($context['sub_action'])


Display.template.php

Find:

?action=bookmarks;sa=add;topic=' . $context['current_topic']),

Replace:

?action=bookmarks;sa=add;booktopic=' . $context['current_topic']),
Former SMF Core Developer | My Mods | SimplePortal

Carlos Gandra

Sorry for late reply, that works! Thank you very much ;)
Carlos Gandra
Mundo dos Animais

Advertisement: