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

asdboard

I have a little problem with this mod. Whenever I empty the bookmarks list, I get redirected to the bookmarks page (and this is not strange), but it shows up with oversized font. Clicking on any link sets everything back to the right font size. Suggestions, anyone?

RoarinRow

Will this be available for RC3?   :D

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

codenut

any chance that I might get a bit of help getting the mode to work in a theme that uses graphic buttons

the code in Display.Template.php for adding the Bookmark item is


'bookmark' => array('test' => 'can_reply', 'image' => 'print.gif', 'text' => 'bookmark', 'lang' => true, 'url' => $scripturl . '?topic=' . $context['current_topic'] . '.0;do=Bookmark'),


one of the themes I am trying to add this to uses graphic buttons (which I have made - or make as I go) but I cannot figure how it would get inserted.


$buttonArray = array();
if ($context['can_reply'])
$buttonArray[] = '<a href="' . $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/reply.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]) . '</a>';

if ($context['can_mark_notify'])
$buttonArray[] = '<a href="' . $scripturl . '?action=notify;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id'] . '" onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_topic'] : $txt['notification_enable_topic']) . '\');">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/notify.gif" alt="' . $txt[131] . '" border="0" />' : $txt[131]) . '</a>';


I am primarily an asp.net guy so my php skills are what you might call sevrely lacking (but working on improving) so hence my request for help.
Steven Hodson
WinExtra
Blog: http://www.winextra.com
Forums: http://www.winextra.com/forums

GetRank

useful mod
waiting for RC3 version  ;)


Garry1953

I just installed it on RC3.
Its working fine.
I had to add the Bookmark button manually, as my forum is heavilly modified.

Endeavour Art Studio

GetRank

installed to "new forum" (rc3)
but getting this error

2: Invalid argument supplied for foreach()
File : /************/forum/Themes/default/Bookmark.template.php (eval?)
Line: 21


line21: foreach($context['bookmarks'] as $bookmarks){

uninstall the mod and waiting for rc3 version (or a solution)
this mod in my favorite 5 mods  ;)

fiver

I have followed the suggestions here, made the changes, packaged it up and it works fine on my 1.1rc3 forum.

Also corrected the spelling mistakes and calm down the '!!!' in warning messages with '.' instead.

I'd like to share it with those interested, but I can't attach the files here, is it possible to submit as an updated mod here?

:)

Skipdawg

Contact the author Leipe Po about update info.
Skipdawg's Community

Powered by SMF 1.1.3

RoarinRow

Quote from: fivearts on October 09, 2006, 08:12:40 AM
I have followed the suggestions here, made the changes, packaged it up and it works fine on my 1.1rc3 forum.

Also corrected the spelling mistakes and calm down the '!!!' in warning messages with '.' instead.

I'd like to share it with those interested, but I can't attach the files here, is it possible to submit as an updated mod here?

:)

While we're waiting is it possible to just point out what files you modified and the lines to look for and update?   ;)

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

GetRank

Quote from: fivearts on October 09, 2006, 08:12:40 AM
I have followed the suggestions here, made the changes, packaged it up and it works fine on my 1.1rc3 forum.

Also corrected the spelling mistakes and calm down the '!!!' in warning messages with '.' instead.

I'd like to share it with those interested, but I can't attach the files here, is it possible to submit as an updated mod here?

:)

great news

Quote from: RoarinRow on October 09, 2006, 02:21:30 PM
While we're waiting is it possible to just point out what files you modified and the lines to look for and update?   ;)

sure,  want to look over  :D

fiver

#51
I will put a temporary link here for a week. I am using it on smf1.1rc3 only.

Download it to your pc and upload/install through Admin > Packages > Download Packages > [Choose...] > [Upload]

[edit: link removed]

MarkoWeb

Can you make this mod compatible with 1.0.8?

Xarcell

Any chance you can make this work as a Tiny Portal module?

Gobo

lol seems the 2 of us are out mod hunting

im gona try and install this on my test site and see how it goes

RoarinRow

Quote from: Xarcell on November 04, 2006, 08:44:49 PM
Any chance you can make this work as a Tiny Portal module?

I'd like it for TP as well please   :)

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

Rahya

Hello Leipe ;-)

greetings from germany woman who is married with an netherlands :)

I filled in all of the changes manually who must be made for running the bookmark-mod... but there's one thing I doesn't find, so i could not change it :(
Can you help me?

This should be replaced in Display.template.php:

$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']),
[b]'bookmark' => array('test' => 'can_reply', 'image' => 'print.gif', 'text' => 'bookmark', 'lang' => true, 'url' => $scripturl . '?topic=' . $context['current_topic'] . '.0;do=Bookmark'),[/b] (this line has to be filled in!!)
'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'),
);


because the structure of my template is:
function theme_show_main_buttons()
{
global $context, $settings, $options, $txt, $scripturl;

$buttonArray = array();
if ($context['can_reply'])
$buttonArray[] = '<a href="' . $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/reply.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]) . '</a>';
if ($context['can_add_poll'])
$buttonArray[] = '<a href="' . $scripturl . '?action=editpoll;add;topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/addpoll.gif" alt="' . $txt['add_poll'] . '" border="0" />' : $txt['add_poll']) . '</a>';
if ($context['can_mark_notify'])
$buttonArray[] = '<a href="' . $scripturl . '?action=notify;sa=' . ($context['is_marked_notify'] ? 'off' : 'on') . ';topic=' . $context['current_topic'] . '.' . $context['start'] . ';sesc=' . $context['session_id'] . '" onclick="return confirm(\'' . ($context['is_marked_notify'] ? $txt['notification_disable_topic'] : $txt['notification_enable_topic']) . '\');">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/notify.gif" alt="' . $txt[131] . '" border="0" />' : $txt[131]) . '</a>';
if ($context['can_send_topic'])
$buttonArray[] = '<a href="' . $scripturl . '?action=sendtopic;topic=' . $context['current_topic'] . '.0">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/sendtopic.gif" alt="' . $txt[707] . '" border="0" />' : $txt[707]) . '</a>';
$buttonArray[] = '<a href="' . $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0" target="_blank">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/print.gif" alt="' . $txt[465] . '" border="0" />' : $txt[465]) . '</a>';

return implode($context['menu_separator'], $buttonArray);
}


So i could not replace it, because it's other code...

I think that's the reason why I could not see the Button/Link in the themes to "add" to Bookmarks.
The Bookmarks-Button is on the startpage an when I get on it, I see an empty list (must be filled)  ;)
Because for this I need the button/link in themes to add to Bookmarks...

Greetings,
Rahya

Xarcell

@ Rahya

Your not looking at the right section of code.

You need to add:

'bookmark' => array('test' => 'can_reply', 'image' => 'print.gif', 'text' => 'bookmark', 'lang' => true, 'url' => $scripturl . '?topic=' . $context['current_topic'] . '.0;do=Bookmark'),


After:

'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']),


in that section of code. You need to find the right section of code. Around line 178, or near about 20% of the way down the page.


Sam_Gordon

Quote from: fivearts on October 12, 2006, 02:15:34 AM
I will put a temporary link here for a week. I am using it on smf1.1rc3 only.

Download it to your pc and upload/install through Admin > Packages > Download Packages > [Choose...] > [Upload]

[edit: link removed]

Once again, please...  :)

adp

where i can find the link to my bookmarks list after install?  :-X

Advertisement: