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

Leipe Po

Link to Mod

This modification gives you the ability to Bookmark topics,
witch would be very usefull for quick lookups, it uses javascript alerts to tell the user what happends, so they stay on the same page, instead of needing to go back to the topic,

its also detects deleted topics, and auto prune them, giving the users that has a bookmark of the topic a alert that
some topics were auto deleted cause they don't exists anymore,

users will also have the option to choose it as a normal link(witch opens in same window) or choose to open it in a new window, and offcource delete it

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

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

onijin

intresting...

There were a lot of requests for this one... I'll be sure to test it out...

Thanx~   ^_^

Leipe Po

no problem, if encountered any problem, please let me know so i can fix it!!!,
thanks for the interest of using my product!!!

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."

Leipe Po

update to 1.1 as soon as possible,

some language lines were accidentally left out of the 1.0 package,
i reccommend updating as soon as possible,
my greatest apologies!!!

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."

sbarnes

What a great mod, works really well apart from one main problem on my setup. Not sure if this a problem with the mod or a conflict with one of many other mods.

When I add a topic to the bookmarks, it adds the first post and also all replies to that post. So for a topic that has say 20 replies, I get the first post plus 20 RE: the first posts in the bookmarks.

If I can get that sorted I would be very pleased. Any ideas?

Leipe Po

could you post a screenshot of what happend?
sorry i don't understand quite as well what your meaning is, also witch version are you using, just release 1.1 cause i overlooked some language lines  :-[

sorry, my apologies

edit:
i registered to your site, dont see the bookmark mod?
There is only one thing more importend to me then coding:
My Girlfriend

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

Leipe Po

#6
finded the bug, for a quick fix:

delete any version before 1.2, install 1.2 or higher(when available)!!
There is only one thing more importend to me then coding:
My Girlfriend

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

Tony Reid

This doesnt appear to be available in the classic theme (index.template.php) - so Im guessing it wont install easily on others that are based off it?

<![CDATA[ if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
$current_action = $context['current_action'];
  ]]>
Tony Reid

Leipe Po

Quote from: Tony on May 23, 2006, 04:40:37 AM
This doesnt appear to be available in the classic theme (index.template.php) - so Im guessing it wont install easily on others that are based off it?

<![CDATA[ if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
$current_action = $context['current_action'];
  ]]>


nope, currently it only supports the default theme, will look into multi theme support once 1.1 final is there,
if you feel like adding support for it, feel free to..

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."

sbarnes

Just installed 1.2, works a treat.

Please feel free to try it out with the login you created.

everyone else can try it using login: username: test password:testtest

<Edit: website would help; www.pick-your-brains.co.uk>

K_4_kelly

 :)

i tried to install
but it got the errors as below:

Execute Modification ./Themes/default/index.template.php Test failed
Execute Modification ./index.php Test failed

anyone help?

thanks!

Leipe Po

what is the forum version you are using, this one only works for 1.1RC2,
also if those files are modified it could be a problem, but i would be glad to help,


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."

K_4_kelly

Quote from: Leipe Po on May 24, 2006, 06:39:10 AM
what is the forum version you are using, this one only works for 1.1RC2,
also if those files are modified it could be a problem, but i would be glad to help,


Leipe Po

thanks for your reply.
i m using 1.1rc2, i didnt modify anything of the 1.1rc beside installed mods
any idea?

thanks!

Leipe Po

hmmzzz,
no problems on my local testing server with the package downloaded from here(on a clean smf install),
you can also mod the files by hand, if the install doesnt succeed,

there can be several issues with the installation, one of witch could be that some mods modifyed the code the bookmark mod uses, witch will result in a failure, the onley option then is install by hand...
can you post a link to your site?
There is only one thing more importend to me then coding:
My Girlfriend

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

qureshi

Hi Leipe Po!

Great work,

But one thing, whenever I access My Bookmarks, this error comes up in the error log:

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

How do I fix this?

Nadeem

qureshi

Hi again,

Ok, I think I figured it out.

When a person has 0 bookmarks, the variable $context['bookmarks'] becomes empty. Thus, we have no index, which makes the argument invalid.

So, one line before:
foreach($context['bookmarks'] as $bookmarks){

Paste:
If ( !empty($context['bookmarks'])){

And on line 85: put an } sign.

Nadeem

ikbenivo


Harzem

If ( isset($context['bookmarks'])){

would be better.

Leipe Po

this will be corrected in version 1.3 allong with some new stuff!
!empty or isset is more of a coding style then a matter of preformance, they will both return the same result, i prefer something like harzem posted,
but !empty works just as well  ;)
There is only one thing more importend to me then coding:
My Girlfriend

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

Harzem

#19
I think "isset" controls whether it is set or not. "empty" first controls whether is is set or not, but if it is set, it checks its value whether it is Null or not. So, when the variable is really set, empty does two checks but isset does one check.

I don't remember where I've read this, but this statement is somewhere deep in my mind :-\

edit:

Example 1. A simple empty() / isset()  comparison.

$var 
0;

// Evaluates to true because $var is empty
if (empty($var)) {
   echo 
'$var is either 0, empty, or not set at all';
}

// Evaluates as true because $var is set
if (isset($var)) {
   echo 
'$var is set even though it is empty';
}


http://www.php.net/manual/en/function.empty.php

Advertisement: