News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Bookmark Mod

Started by Leipe Po, May 22, 2006, 11:48:26 PM

Previous topic - Next topic

Rahya

did this changings in the default-dir in Display.template.php, but the button "add to favorites" doesn't shown :(((

In the Display.template.php from my otherstyle-dir, there's not the code to replace for, this code I've shown in my posting before... look down...

Don't know why this doesn't work, I've missed only the "add-to-bookmark" button in themes/boards, others work...

bambi

Bookmark Mod By Leipe Po 1,2 doesn't work with SMF 1.1

Some idea?

vbgamer45

Try to contact the mod author and see if they will update the mod.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

bambi

#63
Quote from: vbgamer45 on December 05, 2006, 04:11:24 PM
Try to contact the mod author and see if they will update the mod.

Mmmm....Leipe Po   Last Active:   November 04, 2006, 13:28:35

mgillespie

#64
Any news on this? This is a really neat mod, and not having it for 1.1.1 is a problem for me, means I cannot update my forum software until this happens.

Seems the original author is not around that often, looking at the licence, it appears, as long as I upload any modded version here, and it benefits SMF, then we are free to do so.

I have modified Bookmark 1.2 to work with SMF 1.1.1 (ONLY this version).  I have re-labelled it 1.3.  Hopefully the original author is OK with this.

As usual this comes with no warranties, but it worked a treat on my SMF 1.1.1 installation, and the changes required should not have broken anything (whitespace tabulation has changed in the search criterea).

I have attached the mod, I hope it helps out others..  SMF seriously needs a thread bookmarker, and this is a very good implementation...

bambi

#65
   
Install mod.
You must ignore warnings, and continue with the installation.

Finally, you will introduce modifications in the following files.

default\Display.template.php
Search:

//SHOW THE LINKTREE:

Add below
//this is for the messages of the bookmarks:
        if(isset($context['bookmark_message']))
                echo $context['bookmark_message'];

index.php
Search:
'.xml' => array('News.php', 'ShowXmlFeed'),
Add below
'Bookmarks' => array('Bookmark.php', 'ShowBookmarks'),

You can test it in my site: 
User: test
Password: test

Gobo

#66
thanks - I tested on ur site - works perfectly,
ill attempt install now on my forum too :D

EXCELLENT - works perfectly thanks for the 1.1.1 package mgillespie

Garry1953

The only Error I had, was for the index.template.php
(It only needed the Button to be added in the array settings)

All other parts installed fine. (No need to modify the code in Display.template.php or index.php)

Thanks

My site below, if anyone wants to check it out  ;D
http://artforum.gpurcell.com/

RoarinRow

Very cool, thanks for updating for 1.1.1    ;)  I just had to manually add the array 'Bookmarks' to my custom theme's index.template.php file.

From the package:

if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
      $current_action = $context['current_action'];]]></search>
        <add><![CDATA[
                if (in_array($context['current_action'], array('Bookmarks', 'search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
                  $current_action = $context['current_action'];


SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

4fit?

SMF Version: 1.1.1
Quote from: bambi on December 26, 2006, 02:49:41 PM
   
Install mod.
You must ignore warnings, and continue with the installation.

Finally, you will introduce modifications in the following files.

default\Display.template.php
Search:

//SHOW THE LINKTREE:

Add below
//this is for the messages of the bookmarks:
        if(isset($context['bookmark_message']))
                echo $context['bookmark_message'];

index.php
Search:
'.xml' => array('News.php', 'ShowXmlFeed'),
Add below
'Bookmarks' => array('Bookmark.php', 'ShowBookmarks'),

You can test it in my site: 
User: test
Password: test
So, we install the mod that mgillespie posted and then apply these changes?  Am I correct in this?  I think my users would really like something like this and I am getting an error on Display.template.php when trying to install through the Package Manager.

Gobo

ur changes will depend on IF and WHICH files the modifications fail on

as u can see for everyone it was different

4fit?

Quote from: akulion on December 27, 2006, 05:20:59 PM
ur changes will depend on IF and WHICH files the modifications fail on

as u can see for everyone it was different
OK, I have absolutely no idea what code to edit.  Like I said in the first post, I get an error on Display.template.php when trying to install using the Package Manager.  I know zilch about php coding, so, unfortunately, I need a little hand holding at the moment.

Gobo

display.template.php file has 2 modifications
if u have other mods installed OR ur using a different theme there will be slight differences here and there

so if u cant find the whole code, try searcing for a single line from the code making sure there arent more codes like that around (just compare the full code to what follows the line to make sure its the correct part)

either ways make a BACKUP of the files before proceeding

First find:

$normal_buttons = array(
'reply' => array('test' => 'can_reply', 'text' => 146, 'image' => 'reply.gif', 'lang' => true, 'url' => $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies']),
'notify' => array('test' => 'can_mark_notify', 'text' => 125, 'image' => 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_topic'] : $txt['notification_enable_topic']) . '\');"', 'url' => $scripturl . '?action=notify;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
'custom' => array(),
'send' => array('test' => 'can_send_topic', 'text' => 707, 'image' => 'sendtopic.gif', 'lang' => true, 'url' => $scripturl . '?action=sendtopic;topic=' . $context['current_topic'] . '.0'),
'print' => array('text' => 465, 'image' => 'print.gif', 'lang' => true, 'custom' => 'target="_blank"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'),
);


replace it with:

$normal_buttons = array(
'reply' => array('test' => 'can_reply', 'text' => 146, 'image' => 'reply.gif', 'lang' => true, 'url' => $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies']),
'bookmark' => array('test' => 'can_reply', 'image' => 'print.gif', 'text' => 'bookmark', 'lang' => true, 'url' => $scripturl . '?topic=' . $context['current_topic'] . '.0;do=Bookmark'),
    'notify' => array('test' => 'can_mark_notify', 'text' => 125, 'image' => 'notify.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_topic'] : $txt['notification_enable_topic']) . '\');"', 'url' => $scripturl . '?action=notify;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id']),
'custom' => array(),
'send' => array('test' => 'can_send_topic', 'text' => 707, 'image' => 'sendtopic.gif', 'lang' => true, 'url' => $scripturl . '?action=sendtopic;topic=' . $context['current_topic'] . '.0'),
'print' => array('text' => 465, 'image' => 'print.gif', 'lang' => true, 'custom' => 'target="_blank"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'),
);


then in the same file find:


// Show the linktree


add before it:

        //this is for the messages of the bookmarks:
        if(isset($context['bookmark_message']))
                echo $context['bookmark_message'];


thats it

4fit?

akulion, you da man!  Thanks for the hand holding!  It is greatly appreciated!!!

RoarinRow

Quote from: 4fit? on December 27, 2006, 07:56:25 PM
akulion, you da man!  Thanks for the hand holding!  It is greatly appreciated!!!

I have the same fix, the only thing I did differently was to use Bloc's button generator to create a 'bookmark' button for some of my custom themes insteading of having two print.gif buttons from this code above:

'bookmark' => array('test' => 'can_reply', 'image' => 'print.gif', 'text' => 'bookmark', 'lang' => true, 'url' => $scripturl

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

Gobo

yea same here had to make a custom button for Neon Theme lol

RoarinRow

Quote from: akulion on December 27, 2006, 09:09:36 PM
yea same here had to make a custom button for Neon Theme lol

I looked and looked and said, wth! two print buttons, but the first one, when you hover over it, is the bookmark button   ;)

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

Gobo

incase u dont have a bookmark button (and name it in the code with the name of a non existant file) then it automaticaly places a text link in its place

B Patterson

Leipe:

Are you going to release an update for 1.1.1?  I would love to use it, but I'm not using 1.1RC2 anymore (don't even have the source) and have users that have requested this mod.  Since you seem to have done a fine-job of it already, I see no need to overwrite what you've done.

Gobo


Advertisement: