News:

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

Main Menu

Bookmarks

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

Previous topic - Next topic

Aaron

Sorry it took me so long to reply here, guys. 'Real life' is demanding attention. :(

Quote from: Altair on November 19, 2007, 04:47:49 PM
Thanks for Updating this Aaron, is it also possible to show WHO posted the latest post?

Yeah, sure. I'll put that on my todo list for the next version, haven't got the time to look into it now, sorry.




Quote from: will888 on November 28, 2007, 04:19:44 AM
Nice Mod. Where can I find my saved bookmarks

You're probably using a custom Display.template.php. Open up that file, and find:


// Build the normal button array.
$normal_buttons = array(
'new_topic' => array((allowedTo('post_new')) ? 1 : 'test' => 'nothinglol', 'text' => 'smf258', 'image' => 'new_topic.gif', 'lang' => true, 'url' => $scripturl . '?action=post;board=' . $context['current_board'] . '.0'),
'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']),


Add after:

'bookmark' => array('text' => 'bookmark_add', 'lang' => true, 'url' => $scripturl . '?action=bookmarks;sa=add;topic=' . $context['current_topic']),


That should do it. :)

RoboO

Quote from: diegolyanky on July 28, 2007, 12:26:14 PM
Installed but don't work on helios_multi theme, and is very hard to midify manually, be cause helios_multi has index.template.php and display.template.php are very differents.

Any ideas ?

I'm having this same problem.  Do you know a fix for this Aaron?

Hoochie Coochie Man

Thank you for mod
and these are the Turkish Language

Modifications.turkish.php
$txt['bookmarks'] = 'Favori Konularım';
$txt['bookmark_not_for_guests'] = 'Üzgünüm, Bu Forumda Sadece Üyeler \'Favori Konular\' özelliğini kullanabilir!';
$txt['bookmark_list'] = 'Favori Konular';
$txt['bookmark_list_empty'] = 'Şuan Hiç Favori Konunuz Yok!. Mesajdaki \'Favorilerime ekle\' butonunu kullanarak ekleyebilirsiniz.';
$txt['bookmark_open_window'] = 'Yeni Pencerede Aç';
$txt['bookmark_delete'] = 'Favori Konuyu Sil';
$txt['bookmark_delete_success'] = 'Favori Konu Silindi!';
$txt['bookmark_delete_failure'] = 'Favori Konu Silinemedi!';
$txt['bookmark_add'] = 'Favorilerime Ekle';
$txt['bookmark_add_success'] = 'Konu, Favori Konularınıza eklendi!';
$txt['bookmark_add_exists'] = 'Bu Konu Zaten Favori Konularınızda Var!';
$txt['bookmark_add_failed'] = 'Favori Konu Eklemede Hata!';
İnadına SMF 1.1.X

emrahdincer

Hi Friends,

I am using  1.1.4 "Classic YaBB SE Theme"  in my forum.  I installed Bookmarks  MOD  ,  but like other users   I cant see any button to add bookmark on my forum.  I tried something which is  described in this Topic ,  but I cant solve my problem.
Forum language is Turkish.

www.KarTutkusu.com

Sample code from my  Display.template.php.   I add   "global $bar_exps, $bar_posts;"  line in it but noting was change :(


function theme_show_main_buttons()
{
   global $context, $settings, $options, $txt, $scripturl;
   global $bar_exps, $bar_posts;         

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



Javaman56

Helllppp!! :(

I have SMF 1.1.4 and have tried to use this mod over the past 3 days. I have installed it properly etc. [according to the package manager] yet cannot see it anywhere on any theme.
This last time I checked the error log and the following is what I get.

512: package_flush_cache(): some files are still not writable
File: d:\home\hnt5a095\forum\Sources\Subs-Package.php
Line: 1905

2: fopen(d:\home\hnt5a095\forum/Sources/Bookmarks.php) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory
File: d:\home\hnt5a095\forum\Sources\Subs-Package.php
Line: 1901

2: copy(d:\home\hnt5a095\forum/Sources/Bookmarks.php) [<a href='function.copy'>function.copy</a>]: failed to open stream: Permission denied
File: d:\home\hnt5a095\forum\Sources\Subs-Package.php
Line: 1025

2: fclose(): supplied argument is not a valid stream resource
File: d:\home\hnt5a095\forum\Sources\Subs-Package.php
Line: 1908

2: fopen(d:\home\hnt5a095\forum/Sources/RemoveTopic.php) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied
File: d:\home\hnt5a095\forum\Sources\Subs-Package.php
Line: 1901

What do I need to do?????
Keepin' on for Christ,
David
www.roughhewnministries.com
www.roughhewnministries.com/forum/index.php

bruno.cunha

I can see the bookmark button on the default smf 114 theme, but when I change the server language to portuguese it disapeares. How can I correct this?
Thanks
Open your mind

emrahdincer

Can any one  help me ??   I  still waiting your solutions...

TrueSatan

Quote from: bruno.cunha on December 12, 2007, 09:27:26 AM
I can see the bookmark button on the default smf 114 theme, but when I change the server language to portuguese it disapeares. How can I correct this?
Thanks

As per the Turkish translation discussed earlier in this topic you need to make a translation of the mod.

TrueSatan

Quote from: Rough-Hewn on December 11, 2007, 09:31:08 PM
Helllppp!! :(

I have SMF 1.1.4 and have tried to use this mod over the past 3 days. I have installed it properly etc. [according to the package manager] yet cannot see it anywhere on any theme.
This last time I checked the error log and the following is what I get.

512: package_flush_cache(): some files are still not writable
File: d:\home\hnt5a095\forum\Sources\Subs-Package.php
Line: 1905

2: fopen(d:\home\hnt5a095\forum/Sources/Bookmarks.php) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory
File: d:\home\hnt5a095\forum\Sources\Subs-Package.php
Line: 1901

2: copy(d:\home\hnt5a095\forum/Sources/Bookmarks.php) [<a href='function.copy'>function.copy</a>]: failed to open stream: Permission denied
File: d:\home\hnt5a095\forum\Sources\Subs-Package.php
Line: 1025

2: fclose(): supplied argument is not a valid stream resource
File: d:\home\hnt5a095\forum\Sources\Subs-Package.php
Line: 1908

2: fopen(d:\home\hnt5a095\forum/Sources/RemoveTopic.php) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied
File: d:\home\hnt5a095\forum\Sources\Subs-Package.php
Line: 1901

What do I need to do?????

Your host appears to have fopen disabled...contact them if you wish that to be changed otherwise you will not be able to use this mod.

TrueSatan

Quote from: emrahdincer on December 10, 2007, 03:20:21 AM
Hi Friends,

I am using  1.1.4 "Classic YaBB SE Theme"  in my forum.  I installed Bookmarks  MOD  ,  but like other users   I cant see any button to add bookmark on my forum.  I tried something which is  described in this Topic ,  but I cant solve my problem.
Forum language is Turkish.

www.KarTutkusu.com

Sample code from my  Display.template.php.   I add   "global $bar_exps, $bar_posts;"  line in it but noting was change :(


function theme_show_main_buttons()
{
   global $context, $settings, $options, $txt, $scripturl;
   global $bar_exps, $bar_posts;         

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




Like almost all mods this mod only installs automatically into the SMF default theme. You will need to manually install into all other, custom, themes.

Please read:

http://docs.simplemachines.org/index.php?topic=402.msg531#msg531

http://www.simplemachines.org/community/index.php?topic=34526.0

The following may also prove helpful:

http://modparser.dev.dansoftaustralia.net/

Mirror of the last link:

http://www.smfhacks.com/smf-package-parser.html

Ambasador

Hi, thanx for the mod, it's great! Works without problems!

I'll post here the serbian translation as soon as I find out a better way to translate the word bookmark.

Altair

Quote from: Aäron on December 01, 2007, 08:49:45 AM
Quote from: Altair on November 19, 2007, 04:47:49 PM
Thanks for Updating this Aaron, is it also possible to show WHO posted the latest post?

Yeah, sure. I'll put that on my todo list for the next version, haven't got the time to look into it now, sorry.

Thank Aaron, do you think you can update this mod to be compatible with 2.0 when it comes out also?

dannbass

Aäron, is there a possibility of using cURL or fsockopen instead of fopen?

gamerxgirl

Great mod, I was wondering if you could add a new feature or if someone could code something up as to how to add this to the Profile menu.
Xenaverse.net Xena: Warrior Princess Forums | Gallery | Reviews | Fan Fiction

Aaron

No updates on the mods yet, sorry.

Quote from: dannbass on January 07, 2008, 06:19:38 PM
Aäron, is there a possibility of using cURL or fsockopen instead of fopen?

I don't recall using fopen() anywhere in the bookmarks mod, so it's probably an SMF related issue. Is the $boarddir of your forum correct? You can check via Admin -> Server Settings -> Forum Directory

dannbass

I actually haven't installed it yet... I just read this message and got the idea that it needed fopen() but anyway... I'll install it then!

Thanks a lot Aäron!

woolly bugger

I had this mod in 1.4 and it worked okay! But then I was messing around in the index.template.php and now the "button" is missing for "My Bookmarks"

I tried to uninstall but get an error on the index.template.php

Next I looked and the xml and tried to do a manual install on the index.template.php but couldn't find the code and need some help...

this is from the mod
<file name="$themedir/index.template.php">
<operation>
<search position="before"><![CDATA[
if (in_array($context['current_action'], array('search',]]></search>
<add><![CDATA[ 'bookmarks',]]></add>
</operation>

<operation>
<search position="after"><![CDATA[
// The [calendar]!]]></search>
<add><![CDATA[
    // The [bookmarks] button
if ($context['user']['is_logged'])
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>' : '';
]]></add>
</operation>
</file>


this is the index.template.php (the part where I think the code goes?????)
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

// Work out where we currently are.
$current_action = 'home';
if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
$current_action = 'admin';
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
$current_action = $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action = 'search';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

if ($context['current_action'] == 'chat')
$current_action = 'chat';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first = 'last';
$last = 'first';
}
else
{
$first = 'first';
$last = 'last';
}

// Show the start of the tab section.
echo '
<table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
<tr>
<td class="maintab_' , $first , '">&nbsp;</td>';

// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '">' , $txt[103] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

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

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

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'admin' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=admin">' , $txt[2] , '</a>
</td>' , $current_action == 'admin' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

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

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'pm' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a>
</td>' , $current_action == 'pm' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

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

// FlashChat!
global $modSettings;
if ($context['user']['is_logged'])
echo ($current_action == 'chat' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'chat' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=chat"', (!empty($modSettings['fc_newWindow']) ? ' target="_blank"' : ''), '>', $txt['fc_chat'], (!empty($modSettings['fc_showUserCount']) && !empty($context['num_chat']) ? ' [<strong>' . $context['num_chat'] . ' ' . ($context['num_chat'] == 1 ? $txt['user'] : $txt['users']) . '</strong>]' : ''), '</a>
</td>' , $current_action == 'chat' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

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


// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'login' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=login">' , $txt[34] , '</a>
</td>' , $current_action == 'login' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'register' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=register">' , $txt[97] , '</a>
</td>' , $current_action == 'register' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'logout' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>
</td>' , $current_action == 'logout' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

// The end of tab section.
echo '
<td class="maintab_' , $last , '">&nbsp;</td>
</tr>
</table>';

}

// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '">&nbsp;</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' &nbsp;|&nbsp; ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '">&nbsp;</td>';
}

?>


slackerpunk

is it just me or anyone else is having this problem I cannot download the mod from the link to mod link

Aaron

I just reuploaded the mod, so it should be working again now. :)

slackerpunk

ei thanks... was that a site bug?

Advertisement: