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

Eclipse16V

Quote from: Vekseid on November 22, 2009, 11:23:12 AM
Real quick patch job here: http://elliquiy.com/pics/bookmarks222.zip

It only works with RC2 because of the new default template.

Nice but there is a DB Error after the install.

Run this after the install in your DB
ALTER TABLE `bookmarks` RENAME `smf_bookmarks` ;
After it works great.
I worked with:
SMF 2 in German

Shop:
SID Giessen

Tanks

I rather not go into my DB - I am not that comfortable with it.

Also i think my DB has Bookmarks in it because i used this mod back in the days.

Altair

Quote from: Tanks on December 02, 2009, 03:21:00 PM
I rather not go into my DB - I am not that comfortable with it.

Also i think my DB has Bookmarks in it because i used this mod back in the days.

If you are comfortable with php or SQL, you can always run a query to drop the table "smf_bookmarks" if you are no longer using it.

Greywolfdoc

Quote from: Eclipse16V on December 02, 2009, 06:21:18 AM

Nice but there is a DB Error after the install.

Run this after the install in your DB
ALTER TABLE `bookmarks` RENAME `smf_bookmarks` ;
After it works great.

There are also two other problems.

1. The linktree is repeated twice with consequent interruption of the background image.

To eliminate the repetition of linktree just delete this part of code


./Themes/default/Bookmarks.template.php

Search and delete:

// Show the linktree
echo '
<div>', theme_linktree(), '</div>';



2. The title bar hasn't rounded corners 




Eclipse16V

1. and 2. have I edit in my template file.

Here my bookmarks.template.php and it works great.
<?php
function template_main()
{
global $context$settings$scripturl$txt$return;

// Show $return when it's set
if (!empty($return))
{
echo '
<table align="center" cellpadding="15" cellspacing="0" class="tborder">
<tr>
<td class="windowbg">'
$return'</td>
</tr>
</table>
<br />'
;
}

// Show the bookmark table title
echo '
<h3 class="catbg"><span class="left"></span>'
$txt['bookmark_list'], '</h3>
<form action="'
$scripturl'?action=bookmarks;sa=delete" method="post">';

// Show the bookmarks if there are any
if (!empty($context['bookmarks']))
{
echo '
<div class="tborder topic_table" id="messageindex">
<table class="table_grid" cellspacing="0">
<thead>
<tr>
<th scope="col" class="smalltext first_th" width="8%">&nbsp;</th>
<th scope="col" class="smalltext">'
$txt['subject'], '</th>
<th scope="col" class="smalltext" width="11%">'
$txt['started_by'], '</th>
<th scope="col" class="smalltext" width="4%">'
$txt['replies'], '</th>
<th scope="col" class="smalltext" width="4%">'
$txt['views'], '</th>
<th scope="col" class="smalltext" width="22%">'
$txt['latest_post'], '</th>
<th scope="col" class="smalltext last_th" width="8%" align="center"><input type="checkbox" class="check" onclick="invertAll(this, this.form);" /></th>
</tr>
</thead>
<tbody>'
;

foreach ($context['bookmarks'] as $topic)
{
// Show the topic's subject
echo '
<tr>
<td class="windowbg2" align="center">
<img src="'
$topic['first_post']['icon_url'], '" alt="" />
</td>
<td class="windowbg" valign="middle">
'
$topic['first_post']['link'];

// Any new replies?
if ($topic['new'])
echo '
<a href="'
$topic['new_href'], '"><img src="'$settings['images_url'], '/'$context['user']['language'], '/new.gif" alt="'$txt['new'], '" /></a>';

// Show the board the topic was posted in, as well as a link to the profile of the topic starter
echo '
<br />
<span class="smalltext"><i>'
$txt['in'], ' '$topic['board']['link'], '</i></span>
</td>
<td class="windowbg2" valign="middle">'
$topic['first_post']['member']['link'], '</td>
<td class="windowbg" valign="middle" align="center">'
$topic['replies'], '</td>
<td class="windowbg" valign="middle" align="center">'
$topic['views'], '</td>
<td class="windowbg2" valign="middle">
<a href="'
$topic['last_post']['href'], '"><img src="'$settings['images_url'], '/icons/last_post.gif" alt="'$txt['last_post'], '" title="'$txt['last_post'], '" style="float: right;" /></a>
<span class="smalltext">
'
$topic['last_post']['time'], '<br />
'
$txt['by'], ' '$topic['last_post']['member']['link'], '
</span>
</td>
<td class="windowbg2" valign="middle" align="center"><input type="checkbox" name="remove_bookmarks[]" value="'
$topic['id'], '" class="check" /></td>
</tr>'
;
}

echo '
<tr>
<td colspan="7" class="windowbg2" align="right">
<input type="submit" name="send" value="'
$txt['bookmark_delete'], '" />
</td>
</tr>
</tbody>
</table>'
;
}
// Show a message saying there aren't any bookmarks yet
else
{
echo '
<div id="help_container">
<div class="windowbg2">
<span class="topslice"><span></span></span>
<div id="helpmain">
'
$txt['bookmark_list_empty'], '
</div>
<span class="botslice"><span></span></span>
</div>
</div>'
;
}

echo '
</form>'
;

}
?>
I worked with:
SMF 2 in German

Shop:
SID Giessen

TomW

I see that there is a 2.0 RC1 version available.  Will the manual changes mentioned in this thread make this mod compatible with 2.0 RC2 ?

Arantor

Quote from: TomW on December 30, 2009, 05:43:48 PM
I see that there is a 2.0 RC1 version available.  Will the manual changes mentioned in this thread make this mod compatible with 2.0 RC2 ?

I believe they should. Note that the changes in this thread are not any supported or applied by the original author.

ChaosEnergy

I have it running on rc2 with the changes above
Chaos Empire ®

TomW

Thank you Arantor & ChaosEnergy for the quick responses !

Tanks

I did this and got it working on 2.0 RC2

Thanks, great mod ;)

Vveb.ws

#490
Thanks, good needed mod. I have installed it in my forum.


Add please russian translate for
/Themes/default/languages/Modifications.russian.php
$txt['bookmarks'] = 'Закладки';
$txt['bookmark_list'] = 'Закладки';
$txt['bookmark_list_empty'] = 'У Вас нет закладок в данный момент. Добавляйте закладки, нажав "Добавить в закладки" вверху и внизу любой темы';
$txt['bookmark_open_window'] = 'Открыть в новом окне';
$txt['bookmark_delete'] = 'Удалить выделенные закладки';
$txt['bookmark_delete_success'] = '%1$s закладки были удалены';
$txt['bookmark_delete_failure'] = 'Закладки не могут быть удалены';
$txt['bookmark_add'] = 'Добавить в закладки';
$txt['bookmark_add_success'] = 'Тема добавлена в Закладки';
$txt['bookmark_add_exists'] = 'Эта тема уже есть в Закладках';
$txt['bookmark_add_failed'] = 'Невозможно добавить тему в Закладки';
$txt['permissionname_make_bookmarks'] = 'Создавать закладки для тем';
$txt['cannot_make_bookmarks'] = 'Извините, у Вас нет прав для создания закладок';


Add please switch Permissions
Eng
QuoteIt need to switching on bookmarks in admin panel:
Members: Permissions -> Permissions for the group -> Normal users Edit -> switch Create bookmarks for topics
Rus
QuoteНАДО ВКЛЮЧИТЬ ЗАКЛАДКИ  в админке:
Пользователи: Права доступа -> Права доступа по группам -> Обычные пользователи Изменить -> Галка Create bookmarks for topics


server Denwer
Eng
QuoteFor Denver does not work and the normal install, and queries SQL, it need to create a table in phpMyAdmin
Create a new table in your database:
Name: yourprefix_bookmarks
Margins: 2
and filling it
Rus
QuoteДля Денвера не работает и обычная установка, и запросы SQL, надо создавать таблицу  в phpMyAdmin
Создать новую таблицу в вашей БД:
Имя: вашпрефикс_bookmarks
Поля: 2
и заполнить её


Eng
QuoteSuggestions:
I'd love to see the creation of categories in the bookmarks, so not all in one pile to keep.
Rus:
QuoteПожелания:
Очень хотелось бы увидеть создание категорий в закладках, чтобы не всё в одну кучу сохранять.

Vveb.ws

#491
I recently encountered the following problem - hoster moved to a new server, which is a later version of PHP Version 5.2.12
I use SMF 1.1.11, win-1251
 
I put the mod Bookmarks - http://ozdorovlenie.vveb.ws/index.php?action=bookmarks, a couple of days ago it worked fine, as in Denver (I have install this mod correct), and
1) now writes error:
QuoteDatabase Error
Please try again. If the problem continues to recur, contact the Administrator.

2) sometimes gives another error
QuoteTable 'vvebw701_ozd.ozd_bookmarks' doesn't exist
File: / home/.../ozdorovlenie/Sources/Bookmarks.php
Line: 65

3) sometimes gives another error
QuoteTable 'vvebw701_ozd.ozd_bookmarks' doesn't exist
File: /home/vvebw701/domains/vveb.ws/public_html/ozdorovlenie/Sources/Bookmarks.php
Line: 143

because of what it?

I don't know why is error is changed -  Database Error,  Line: 143, Line: 65
,
 
To see this, you must enter the forum.
User
A5bnTer6k

 
What I must to do ? Rewrite all the old scripts, including mods to SMF, in general, unrealistic.
Search for hosting with the old version of PHP?

TomW

It appears that SMF cannot find your bookmarks table.  Is it named correctly ?  It is looking for odz_bookmarks as the table name. 

Vveb.ws

#493
I have all make right! This table really is. All named correctly.

The DataBase coping from hosting to Denwer.
This mod works on Denwer and not on hosting!


It is something with hosting...

I can show DB:
Quote--
-- Structure table `ozd_bookmarks`
--

CREATE TABLE IF NOT EXISTS `ozd_bookmarks` (
  `ID_MEMBER` mediumint(8) unsigned NOT NULL,
  `ID_TOPIC` mediumint(8) unsigned NOT NULL,
  UNIQUE KEY `ID_MEMBER` (`ID_MEMBER`,`ID_TOPIC`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251;

I have install it by SQL-question in PHPMyAdmin (install.php not works), I have some remake original SQL-question


Hosting kink, toad! Yesterday I have remake index.php to view russian letter instead ???????????? - this problem became with new server. Nothing astonishing...



PS (month later)


Mod "Bookmarks" works good!

I realized what was going on! I switched to a new hosting service, took DB from old hosting, and it turned out, this table is really not! On the new hosting, I created a new table in the database and everything works!

Hoster moved, and at that time were available two PHPMyAdmin
Maybe I made a new table on the old server, and Web hosting has already undergone all DB on the new server, but the old server was still available for some time.
Or, if everything worked and then stopped, Hoster took NOT the most recent backup database for the move (which have not table for bookmarks).
In general, the problem is not in Mod, but in the relocation of the hoster.

Bugo

Russian translation:

// Bookmarks
$txt['bookmarks'] = 'Избранное';
$txt['bookmark_list'] = 'Избранные темы';
$txt['bookmark_list_empty'] = 'В настоящий момент ни одна тема не добавлена в Избранное. Для добавления просто кликните &laquo;Добавить в Избранное&raquo; в нужной теме.';
$txt['bookmark_open_window'] = 'Открыть в новом окне';
$txt['bookmark_delete'] = 'Удалить выбранные темы из списка';
$txt['bookmark_delete_success'] = 'Чистота — залог здоровья :)';
$txt['bookmark_delete_failure'] = 'Не все темы были удалены из Избранного.';
$txt['bookmark_add'] = 'Добавить в Избранное';
$txt['bookmark_add_success'] = 'Тема была успешно добавлена в Избранное!';
$txt['bookmark_add_exists'] = 'Эта тема уже есть в Избранном!';
$txt['bookmark_add_failed'] = 'Добавление темы в Избранное не удалось.';
$txt['permissionname_make_bookmarks'] = 'Добавление тем в Избранное';
$txt['cannot_make_bookmarks'] = 'Извините, Вам не разрешили добавлять темы в Избранное :)';

willerby

Would appear you have table name error - ozd_bookmarks vs odz_bookmarks?
What type of washing machine is September?

An autumnatic. :)

KensonPlays

Will this be made for 2.0RC2?

Eclipse16V

I worked with:
SMF 2 in German

Shop:
SID Giessen

Mick.


searchgr

#499
Quote from: BlueDevil on January 28, 2010, 05:11:29 PM
Quote from: Eclipse16V on January 19, 2010, 12:12:51 AM
Work on 2.0RC2

Yes indeed.

It doesn't work here. smf 2.0 rc2
Aäron, can you please update it?

Advertisement: