News:

SMF 2.0.19 has been released! Please update. Read more.

Main Menu

Bookmarks

Started by Matthew K., July 16, 2007, 01:07:24 PM

Previous topic - Next topic

TomW

#400
This is a great mod !  I had to modify index.template.php and display.template.php because I am using corp-lt116 theme, and it works beautifully !

silber112

Is there any way to put in the staticks the most added posts to bookmarks?¿

AlenNS


vristang

I'd like to hear from anyone using the Babylon theme and has been able to make this mod work.
I ran the installation from the Admin section of my Board, then went through the instructions to make sure my template files were modified correctly.

Here are my problems.

The instructions indicate...
./Themes/default/index.template.php
Since I'm using the babylon template, so I go to....
./ Themes / babylon / index.template.php
and find
if (in_array($context['current_action'], array('search',

However, this section of code in the babylon theme does not appear to exist in my babylon index.template.php file.

Am I accessing the wrong file?


Also,
The instructions indicate file...
./Themes/default/Display.template.php

Since I'm using babylon, I access the following...
./Themes/babylon/Display.template.php

But the code in the instructions is not listed.

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


Instead of the above code, I find array button code that looks like this....
$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 I need to modify this code, then I have no idea how to do that.
Could someone help me out?


Also from the instructions....
At the end of the instructions, it says to move 2 files beginning with 'smf11' to specific folder locations.
Where do I find these 2 files?  They don't seem to be in the zipped file that I downloaded.


I didn't have any trouble pasting the code into the language file
./Themes/default/languages/Modifications.english.php


I'm sure you guys can tell I am new to this stuff  ;)
I greatly appreciate any help.  I think my members will really appreciate this mod.
Thanks,
jason
My Forum - www.SeattleBlueOvals.com
Theme: PremiumMGC
SMF 2.0.2
Hosted by - LunarPages

AlenNS

Any update for RC1?

TomW

vristang, I am using corp-lt, which had a similar problem.  Here is the code that I used; hopefully this helps you:
function theme_show_normal_buttons() {
  global $context, $settings, $options, $txt, $scripturl, $modSettings;
 
  $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>';

// bookmarks add
        if ($context['can_make_bookmarks'])
$buttonArray[] = '<a href="' . $scripturl . '?action=bookmarks;sa=add;topic=' . $context['current_topic'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/bookmark.gif" alt="' . $txt['bookmark_add'] . '" border="0" />' : $txt['bookmark_add']) . '</a>';
// end bookmarks

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>';

You will need to find a bookmark.gif, or create your own, if you are using buttons.  I am attaching the one that was created for me plus my display.template.php.  Note that I have other mods which I install manually - and add comments.  So, the bookmark changes should be easy for you to find.

vristang

Tom,
That worked great in my Display.Template.php...
I now have a button in the threads to add a bookmark.

Still struggling with the Index.Template.php changes though...

Instead of displaying the bookmarks.gif button that I am using, I only get the text 'My Bookmarks'.
Here is the code I am using... which came from the instructions for this mod...

  // The [bookmarks] button
   if (allowedTo('make_bookmarks'))
      echo ($current_action == 'bookmarks' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'bookmarks' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '?action=bookmarks">' , $txt['bookmarks'], '</a>
            </td>' , $current_action == 'bookmarks' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

I think I see where the text is specified, but I haven't been able to change this to display the gif instead of the text.


Functionally, everything else seems to work perfectly.

Thanks for the help,
jason
My Forum - www.SeattleBlueOvals.com
Theme: PremiumMGC
SMF 2.0.2
Hosted by - LunarPages

vristang

#407
I added the following code into the Index.template.php
   // Edit Bookmark... [bookmark]
   if (allowedTo('make_bookmarks'))
      echo '
            <a href="', $scripturl, '?action=bookmarks">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/bookmarks.gif" alt="' . $txt[79] . '" style="margin: 2px 0;" border="0" />' : $txt[467]), '</a>', $context['menu_separator'];


The button now shows, and every thing works properly.


I'm sure the above code could be cleaned up, as I copied most of it from the profile button code in the index.template file.

It does work though  :D



EDIT:
I also had to add the code for Display.template file a second time, for the row of buttons that show at the bottom of the thread.
My Forum - www.SeattleBlueOvals.com
Theme: PremiumMGC
SMF 2.0.2
Hosted by - LunarPages

michelangelo

Please put the fix in a new version and add 1.1.8 support.

vristang

Quote from: michelangelo on March 13, 2009, 05:37:38 PM
Please put the fix in a new version and add 1.1.8 support.
I don't know about adding the fix for the babylon template, but I am using 1.1.8  :P



Since I am using the standard Babylon buttons, I had to resize the button Bookmark button provided earlier in this thread.
The attachments are as follows
1. Provided Bookmark, which had extra width on the right of the image that made the spacing look uneven.
2. This button has been shortened to the appropriate width, to match the rest of the buttons that show at the top and bottom of the threads.
3. This button has been shortened as well, but has also been reduced in height to match the size of the buttons in the main array, below the 'User Info' section at the top of the page.



(I still haven't loaded these to my site, but should get to it later tonight)
My Forum - www.SeattleBlueOvals.com
Theme: PremiumMGC
SMF 2.0.2
Hosted by - LunarPages

busterone

This mod works perfectly in 1.1.8
I have it installed on 12 user selectable themes with no problems at all.

vristang

Just FYI for others using the Babylon Theme...

As I stated previously, there are 2 image sizes for the buttons: thread button is 18pixel tall, and the main button is 16pixel tall

Resizing the image in this thread (with the red admin star), left the text of the image pixelated.  It looked bad on the board.

I created a new image here...
http://www.marcovanveelen.nl/buttongenerator/
Which created the button in the 16pixel size.
I then copied the image/icon/logo from this button to an 18pixel image in photoshop (actually I had a family member help with this...)
Resizing the icon didn't seem to affect the icon quality.

Attached are the 2 images I am now using, which match the rest of my board perfectly...
My Forum - www.SeattleBlueOvals.com
Theme: PremiumMGC
SMF 2.0.2
Hosted by - LunarPages

Rumboogy

I also would like this updated to RC1 if possible.

Thanks,

Wally

willerby

2.0 b4 version works fine on RC1
What type of washing machine is September?

An autumnatic. :)

Rumboogy

Then I am having trouble with "permissions". I can see the bookmarks, and a menu item appears for me (Admin)...however, they do not show up for regular members...is there a way to check my permissions?

Thanks for any help on this...

Wally

coolfx350

#415
I have installed this mods many times, works great.

I recently made a new forum and trying to install this mod again, everything works, but ...

when a topic is bookmarked, it doesn't display the topic heading, the Started by column is also blank.

I do have pretty url mod installed.  Maybe it's conflict.

what to do?

usa4all

MOd installed fine, but it doesn't show up in the SAFMC theme..  What goes wrong? My Default langauage is Dutch.

dj_pont

Установил на RC1-1, под админом всё впорядке, всё отбражается и работает. А у обычных пользователей ничего не отображается. Что-то с правами доступа, где их менять для этого мода?

digger

Quote from: dj_pont on May 28, 2009, 05:31:53 PM
Установил на RC1-1, под админом всё впорядке, всё отбражается и работает. А у обычных пользователей ничего не отображается. Что-то с правами доступа, где их менять для этого мода?

Не смущает что вокруг все по нерусски пишут?

В правах доступа для группы обычных пользователей - Create bookmarks for topics

dj_pont

Quote from: digger on May 28, 2009, 06:07:29 PM
Quote from: dj_pont on May 28, 2009, 05:31:53 PM
Установил на RC1-1, под админом всё впорядке, всё отбражается и работает. А у обычных пользователей ничего не отображается. Что-то с правами доступа, где их менять для этого мода?

Не смущает что вокруг все по нерусски пишут?

В правах доступа для группы обычных пользователей - Create bookmarks for topics

Неа, не смущает=)))

Спасибо за инфу, нашёл! )

Advertisement: