Advertisement:

Author Topic: Bookmark Mod  (Read 96217 times)

Offline Rahya

  • Newbie
  • *
  • Posts: 7
Re: Bookmark Mod
« Reply #60 on: November 26, 2006, 03:13:20 PM »
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...

Offline bambi

  • Jr. Member
  • **
  • Posts: 206
  • Gender: Male
    • Rincón Matemático
Bookmark Mod doesn't work with SMF 1.1
« Reply #61 on: December 05, 2006, 10:28:22 AM »
Bookmark Mod By Leipe Po 1,2 doesn't work with SMF 1.1

Some idea?

Online vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,343
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Bookmark Mod doesn't work with SMF 1.1
« Reply #62 on: December 05, 2006, 04:11:24 PM »
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

Offline bambi

  • Jr. Member
  • **
  • Posts: 206
  • Gender: Male
    • Rincón Matemático
Re: Bookmark Mod doesn't work with SMF 1.1
« Reply #63 on: December 08, 2006, 01:40:56 AM »
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
« Last Edit: December 14, 2006, 11:53:30 AM by bambi »

Offline mgillespie

  • Semi-Newbie
  • *
  • Posts: 19
Re: Bookmark Mod
« Reply #64 on: December 26, 2006, 12:59:12 PM »
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...
« Last Edit: December 26, 2006, 02:29:14 PM by mgillespie »

Offline bambi

  • Jr. Member
  • **
  • Posts: 206
  • Gender: Male
    • Rincón Matemático
Re: Bookmark Mod
« Reply #65 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:
Code: [Select]
//SHOW THE LINKTREE:
Add below
Code: [Select]
//this is for the messages of the bookmarks:
        if(isset($context['bookmark_message']))
                echo $context['bookmark_message'];
index.php
Search:
Code: [Select]
'.xml' => array('News.php', 'ShowXmlFeed'),Add below
Code: [Select]
'Bookmarks' => array('Bookmark.php', 'ShowBookmarks'),
You can test it in my site: 
User: test
Password: test
« Last Edit: December 26, 2006, 04:19:36 PM by bambi »

Offline Gobo

  • Sr. Member
  • ****
  • Posts: 912
  • Gender: Male
  • Peace Be Upon You
    • Path To Peace
Re: Bookmark Mod
« Reply #66 on: December 26, 2006, 04:19:49 PM »
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
« Last Edit: December 26, 2006, 04:28:10 PM by akulion »

Offline Garry1953

  • Jr. Member
  • **
  • Posts: 118
    • Artists Online Australia Art Forum
Re: Bookmark Mod
« Reply #67 on: December 26, 2006, 05:00:03 PM »
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/

Offline RoarinRow

  • Full Member
  • ***
  • Posts: 662
  • Gender: Male
  • Ride my AV!
    • Avalanche Style
Re: Bookmark Mod
« Reply #68 on: December 26, 2006, 05:57:31 PM »
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

Offline 4fit?

  • Jr. Member
  • **
  • Posts: 162
Re: Bookmark Mod
« Reply #69 on: December 27, 2006, 04:47:33 PM »
SMF Version: 1.1.1
   
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:
Code: [Select]
//SHOW THE LINKTREE:
Add below
Code: [Select]
//this is for the messages of the bookmarks:
        if(isset($context['bookmark_message']))
                echo $context['bookmark_message'];
index.php
Search:
Code: [Select]
'.xml' => array('News.php', 'ShowXmlFeed'),Add below
Code: [Select]
'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.

Offline Gobo

  • Sr. Member
  • ****
  • Posts: 912
  • Gender: Male
  • Peace Be Upon You
    • Path To Peace
Re: Bookmark Mod
« Reply #70 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

Offline 4fit?

  • Jr. Member
  • **
  • Posts: 162
Re: Bookmark Mod
« Reply #71 on: December 27, 2006, 07:15:38 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.

Offline Gobo

  • Sr. Member
  • ****
  • Posts: 912
  • Gender: Male
  • Peace Be Upon You
    • Path To Peace
Re: Bookmark Mod
« Reply #72 on: December 27, 2006, 07:35:03 PM »
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:
Code: [Select]
$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:
Code: [Select]
$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:

Code: [Select]
// Show the linktree

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

thats it

Offline 4fit?

  • Jr. Member
  • **
  • Posts: 162
Re: Bookmark Mod
« Reply #73 on: December 27, 2006, 07:56:25 PM »
akulion, you da man!  Thanks for the hand holding!  It is greatly appreciated!!!

Offline RoarinRow

  • Full Member
  • ***
  • Posts: 662
  • Gender: Male
  • Ride my AV!
    • Avalanche Style
Re: Bookmark Mod
« Reply #74 on: December 27, 2006, 08:37:03 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

Offline Gobo

  • Sr. Member
  • ****
  • Posts: 912
  • Gender: Male
  • Peace Be Upon You
    • Path To Peace
Re: Bookmark Mod
« Reply #75 on: December 27, 2006, 09:09:36 PM »
yea same here had to make a custom button for Neon Theme lol

Offline RoarinRow

  • Full Member
  • ***
  • Posts: 662
  • Gender: Male
  • Ride my AV!
    • Avalanche Style
Re: Bookmark Mod
« Reply #76 on: December 27, 2006, 09:40:04 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

Offline Gobo

  • Sr. Member
  • ****
  • Posts: 912
  • Gender: Male
  • Peace Be Upon You
    • Path To Peace
Re: Bookmark Mod
« Reply #77 on: December 27, 2006, 10:03:18 PM »
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

Offline B Patterson

  • Full Member
  • ***
  • Posts: 512
  • Gender: Male
  • Never Miss an Opportunity to be Great
Re: Bookmark Mod
« Reply #78 on: January 02, 2007, 11:52:49 AM »
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.

Offline Gobo

  • Sr. Member
  • ****
  • Posts: 912
  • Gender: Male
  • Peace Be Upon You
    • Path To Peace
Re: Bookmark Mod
« Reply #79 on: January 02, 2007, 05:53:44 PM »
bpat read this post
http://www.simplemachines.org/community/index.php?topic=89003.msg876248#msg876248

it works for 1.1.1 (the package attached to that post)