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

NekoJonez

Alright.

That's great news since now I have something I need to try to fix myself less. ;)
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

Matthew K.


NekoJonez

Well, somebody reported the button staying as a bug and I thought it was something at the forum code. But if you say that it's missing from the mod I just have to wait for an update. ;)
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

Matthew K.

It's just something the modification doesn't do yet. Not a bug with your install.

NekoJonez

Is this another bug or an issue with my version?

"1 bookmark WERE deleted."

That's grammatically not correct.
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

Matthew K.

That's just not something the original author bothered to cover. You see...to do it properly, you have to have a count. Otherwise how do you know whether "1 bookmark WAS deleted" or "2 bookmarkS were deleted", so you have to add something like...', $count, ' bookmark', $count > 1 ? 's were' : ' was', ' deleted. Most programmers don't bother to add such a condition.

NekoJonez

Quote from: Labradoodle-360 on August 03, 2013, 05:21:17 PM
That's just not something the original author bothered to cover. You see...to do it properly, you have to have a count. Otherwise how do you know whether "1 bookmark WAS deleted" or "2 bookmarkS were deleted", so you have to add something like...', $count, ' bookmark', $count > 1 ? 's were' : ' was', ' deleted. Most programmers don't bother to add such a condition.

So are you going to add this feature?




Another minor complaint is that when you select ALL boxes, the top box isn't selected also. Maybe a feature that can be added ;)
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

Matthew K.

It's not really a feature honestly. If/when I revamp this modification, I would most definitely add a single condition to make it grammatically accurate.

Biology Forums

I'dd added the fix for correct grammar:

1) Open bookmarks.php in Source

Find:

// Success or failure?
if ($result)
return sprintf($txt['bookmark_delete_success'], $deleted);
else
return sprintf($txt['bookmark_delete_failure'], $deleted);


Replace with:

// Success or failure?
if ($deleted == 1)
return sprintf($txt['bookmark_delete_success'], $deleted);
elseif($deleted > 1)
return sprintf($txt['bookmark_delete_successes'], $deleted);
else
return sprintf($txt['bookmark_delete_failure'], $deleted);


Open the language file for Modifications.

Find:

$txt['bookmark_delete_success'] = '%1$s bookmarks were deleted successfully!';

Replace with:

$txt['bookmark_delete_success'] = '%1$s favorite was deleted successfully!';
$txt['bookmark_delete_successes'] = '%1$s favorites were deleted successfully!';


Hope this helps. Tested on SMF 1.x

Matthew K.

There's a lot more simple way to do it really...but that does work.

Arantor

Well, yeah, you could just have it says 'x bookmark(s) saved'. But this is certainly cleaner.

Unfortunately the situations is even more complicated when you start to consider multiple languages as not all languages have the same 1/x split of terms. Some languages need a separate translation for 1/2/x and others.
Holder of controversial views, all of which my own.


Cat McFarlane

Hi :-)

I can view 'My Bookmarks' as admin, but logging in as a test user I can see that users can't see 'My bookmarks' on their top menu bar and also don't have the option of bookmarking posts. I'm using Fresh Looks theme.

Thanks :-)

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Cat McFarlane

Quote from: Kindred on September 12, 2013, 10:35:33 PM
Permissions

Thanks; I swear that wasn't there, lol. Been a busy week!  :)

Kalamadea

I keep getting an error when trying to install this mod.

Table 'enterthe_Multiverse.smf_bookmarks' doesn't exist
File: /home/enterthe/public_html/Sources/Bookmarks.php
Line: 88

Matthew K.

So run install.php manually in your browser...just make sure to delete it when you're done.

portex1

Just translated it to Bulgarian. Check your PM.

Cheers! ;D

NekoJonez

Quote from: Liam_michael on August 29, 2013, 02:26:30 PM
I'dd added the fix for correct grammar:

1) Open bookmarks.php in Source

Find:

// Success or failure?
if ($result)
return sprintf($txt['bookmark_delete_success'], $deleted);
else
return sprintf($txt['bookmark_delete_failure'], $deleted);


Replace with:

// Success or failure?
if ($deleted == 1)
return sprintf($txt['bookmark_delete_success'], $deleted);
elseif($deleted > 1)
return sprintf($txt['bookmark_delete_successes'], $deleted);
else
return sprintf($txt['bookmark_delete_failure'], $deleted);


Open the language file for Modifications.

Find:

$txt['bookmark_delete_success'] = '%1$s bookmarks were deleted successfully!';

Replace with:

$txt['bookmark_delete_success'] = '%1$s favorite was deleted successfully!';
$txt['bookmark_delete_successes'] = '%1$s favorites were deleted successfully!';


Hope this helps. Tested on SMF 1.x

I can't find this in the 2.0.6 install...?
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

Biology Forums

That's because those changes were made on the previous version of SMF, SMF 1. It may be a little different on SMF 2, mod author should know what to do.

FireDitto

I wonder if I could bother someone for a little assistance? I've been fiddling around, but I can't quite seem to hit the nail on the head!

What I'd really like to do, is have it so that this Bookmarks mod pulls up the Topic Descriptions when a description is included, and perhaps just leave it blank when one isn't there.

I can manage to create a spot for it on the table, but I'll be squared if I can get it to actually pull forth the descriptions. I'm sure the answer is simple, but I can't seem to find it.

Any assistance would be very, very appreciated!
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

Advertisement: