News:

Wondering if this will always be free?  See why free is better.

Main Menu

Bookmark Mod

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

Previous topic - Next topic

B Patterson

Thanks, totally missed that.

Mr. Jinx

Very nice and easy mod. Great!
Just installed it on SMF 1.1.1
I had to manually create the bookmark table. There was some kind of old bookmark table I had to remove.

Anyway, if you would like a dutch translation of this mod, here it is.
You should put this somewhere in ../YourTheme/languages/Modifications.dutch.php.
The original location was index.english.php (which is wrong, should be Modifications.english.php)

$txt['bookmark'] = 'Favoriet';
$txt['bookmarks'] = 'Favorieten';
$txt['bookmark_open_new'] = 'Nieuw venster';
$txt['bookmark_delete'] = 'Verwijder';
$txt['bookmark_delete_msg'] = 'Favoriet verwijderd';
$txt['bookmark_delete_error1'] = 'Favoriet kon niet worden verwijderd';
$txt['bookmark_delete_error2'] = 'Het favoriet id komt niet overeen';
$txt['bookmark_delete_error3'] = 'Het favoriet id moet een nummer zijn';
$txt['bookmark_auto_delete_msg'] = 'Een aantal van uw favorieten zijn verwijderd omdat het desbetreffende topic niet meer bestaat';
$txt['bookmark_success'] = 'Het onderwerp is aan uw favorieten toegevoegd';
$txt['bookmark_exists'] = 'Het onderwerp was al aan uw favorieten toegevoegd';
$txt['bookmark_failed'] = 'Er ging iets fout met het toevoegen van het onderwerp aan uw favorieten';
$txt['my_bookmarks'] = 'Mijn Favorieten';

Leipe Po

sorry i no langer have the time to update this code,
however anybody who wants to is free to modiiefy the code and release it under his/her name,
again i'm verry sorry,

Greetz Leipe_Po
There is only one thing more importend to me then coding:
My Girlfriend

Microsoft - "You've got questions.  We've got dancing paperclips."

Greek

Pretty mod, but some more elements would be nice. I mean, next to topics, in bookmark's list, to appear new message icon (if exists), last poster name, date e.t.c, like VBulletin.

[Duncan]

#84
hello,

i realize a translation for this mod in French.
And a i change it for work properly with tinyportal 0.9.7.

   
you can do of them what you want :)

edit: just correction off language files.

.Darkman

Will this work in 1.1.1 ?

Clever Tutorials - One place for all of them . . .
SMF Theme Works



RavenLife

umm

seems i am having a problem of having two buttons both saying "my bookmark's"

each button work correctly - and when i click one they both light up to say there open

i found that index.english.php in the language files had two exact same colums of text (see below)

i deleted one of these but still i get the two buttons

anyone know where i can delete these to get rid

thanks

RL

Quote// a whole special block for the bookmark mod!!!:
$txt['bookmark'] = 'Bookmark';
$txt['bookmarks'] = 'Bookmarks';
$txt['bookmark_open_new'] = 'New window';
$txt['bookmark_delete'] = 'Delete';
$txt['bookmark_delete_msg'] = 'Bookmark deleted!!!';
$txt['bookmark_delete_error1'] = 'Sorry, cannot delete the bookmark youve selected!!!';
$txt['bookmark_delete_error2'] = 'Please fill in a bookmark id!!!';
$txt['bookmark_delete_error3'] = 'Please make sure the delete id is a number!!!';
$txt['bookmark_auto_delete_msg'] = 'Some bookmarks are auto-deleted because the topic no longer exists, Sorry';
$txt['bookmark_success'] = 'The topic has been added to your bookmark\'s';
$txt['bookmark_exists'] = 'The topic has allready been bookmarked by you!!!';
$txt['bookmark_failed'] = 'Sorry, but the bookmark has failed, pleas contact the webmaster if this problem continous!!!';
$txt['my_bookmarks'] = 'My Bookmark\'s';

4fit?

Quote from: RavenLife on February 05, 2007, 03:21:02 PM
umm

seems i am having a problem of having two buttons both saying "my bookmark's"

each button work correctly - and when i click one they both light up to say there open

i found that index.english.php in the language files had two exact same colums of text (see below)

i deleted one of these but still i get the two buttons

anyone know where i can delete these to get rid

thanks

RL

Quote// a whole special block for the bookmark mod!!!:
$txt['bookmark'] = 'Bookmark';
$txt['bookmarks'] = 'Bookmarks';
$txt['bookmark_open_new'] = 'New window';
$txt['bookmark_delete'] = 'Delete';
$txt['bookmark_delete_msg'] = 'Bookmark deleted!!!';
$txt['bookmark_delete_error1'] = 'Sorry, cannot delete the bookmark youve selected!!!';
$txt['bookmark_delete_error2'] = 'Please fill in a bookmark id!!!';
$txt['bookmark_delete_error3'] = 'Please make sure the delete id is a number!!!';
$txt['bookmark_auto_delete_msg'] = 'Some bookmarks are auto-deleted because the topic no longer exists, Sorry';
$txt['bookmark_success'] = 'The topic has been added to your bookmark\'s';
$txt['bookmark_exists'] = 'The topic has allready been bookmarked by you!!!';
$txt['bookmark_failed'] = 'Sorry, but the bookmark has failed, pleas contact the webmaster if this problem continous!!!';
$txt['my_bookmarks'] = 'My Bookmark\'s';
Probably have a duplicate entry in index.template.php.  Go have a look there.

4fit?


RavenLife

Quote from: 4fit? on February 05, 2007, 04:23:10 PM
Quote from: RavenLife on February 05, 2007, 03:21:02 PM
umm

seems i am having a problem of having two buttons both saying "my bookmark's"

each button work correctly - and when i click one they both light up to say there open

i found that index.english.php in the language files had two exact same colums of text (see below)

i deleted one of these but still i get the two buttons

anyone know where i can delete these to get rid

thanks

RL

Quote// a whole special block for the bookmark mod!!!:
$txt['bookmark'] = 'Bookmark';
$txt['bookmarks'] = 'Bookmarks';
$txt['bookmark_open_new'] = 'New window';
$txt['bookmark_delete'] = 'Delete';
$txt['bookmark_delete_msg'] = 'Bookmark deleted!!!';
$txt['bookmark_delete_error1'] = 'Sorry, cannot delete the bookmark youve selected!!!';
$txt['bookmark_delete_error2'] = 'Please fill in a bookmark id!!!';
$txt['bookmark_delete_error3'] = 'Please make sure the delete id is a number!!!';
$txt['bookmark_auto_delete_msg'] = 'Some bookmarks are auto-deleted because the topic no longer exists, Sorry';
$txt['bookmark_success'] = 'The topic has been added to your bookmark\'s';
$txt['bookmark_exists'] = 'The topic has allready been bookmarked by you!!!';
$txt['bookmark_failed'] = 'Sorry, but the bookmark has failed, pleas contact the webmaster if this problem continous!!!';
$txt['my_bookmarks'] = 'My Bookmark\'s';
Probably have a duplicate entry in index.template.php.  Go have a look there.

so right, damn php editor wasnt skipping past the first reference

thanks

RavenLife

Does anyone know how to modify this to work with other themes

im trying to get this working on a friends site using Blocs Amber Theme

as you can see on my test site http://testing.wiisrus.com/index.php

QuoteUSERNAME - test
PASSWORD - test1

as you can see when you login i have managed to get it on the main menu (minus) the image ??

but i cant seem to get them into the threads (so you can actually bookmark)

as you will notice when click bookmark - the page is slightly out

i have added and modified the code so it actually works!

(you can see this via switching to default theme, bookmarking a thread, and then switching back)

you will see that the bookmark page is working correctly (apart from images)

so my question is.

can anyone help

Thanks

RL

4fit?

Open up the modification xml file and perform the changes manually.

RavenLife

Quotei have added and modified the code so it actually works!

i did that...

it just doesnt seem to work

RavenLife


RODEOSOLSTICE

didn
Quote from: 4fit? on February 05, 2007, 04:24:15 PM
Quote from: .Darkman on February 04, 2007, 10:56:43 AM
Will this work in 1.1.1 ?
Works in my 1.1.1.
Didn't werk on my 1.1.1 :(

I'm using the default theme...

here's the error on install:

1.     Execute Modification     ./Sources/Display.php     Test successful
2.    Execute Modification    ./Themes/default/Display.template.php    Test failed
3.    Execute Modification    ./Themes/default/index.template.php    Test failed
4.    Execute Modification    ./index.php    Test failed
5.    Execute Modification    ./Themes/default/languages/index.english.php    Test successful
6.    Extract File    ./Sources/Bookmark.php    
7.    Extract File    ./Themes/default/Bookmark.template.php    
8.    Execute Code    create_table.php    

RavenLife

you need to add those codes yourself

RODEOSOLSTICE

Quote from: RavenLife on February 09, 2007, 12:23:59 AM
you need to add those codes yourself

can anyone walk me thru it? I didn't see it here in this thread, maybe I missed it.

thanks!

RavenLife

it is in this topic

see this page - http://www.simplemachines.org/community/index.php?topic=89003.60

Quote from: akulion 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:

$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

RODEOSOLSTICE

thanks a bunch!!! Sorry to be such a newbie at this, I appreciate the help!!!

RavenLife

no problem - if you need anymore help

just post or pm me your email/msn

good luck

Advertisement: