41 Posts
Umair Hassan
10 years ago
11
Topic
Hi,

I would like to add Bookmark Button to my website (same like Seblod Forum have). Can anyone explain me how to add this function?

Thanks & Regards,
Umair
Get a Book for SEBLOD
2 Posts
anonymous
8 years ago
0
Level 1

Hi. this is a really useful feature. Will someone from seblod share the code used to create this feature on this site? Also it would be helpful if there was a remove bookmark option when you revisit a bookmarked page or in the my bookmarks menu

97 Posts
Anjo
8 years ago
0
Level 1

Would like this feature too.

2 Posts
anonymous
8 years ago
0
Level 1

I found this free plugin used in Wordpress. It is pretty straight forward and does the job as needed. Check it out and see if there is anything you can pick up from that.

https://favoriteposts.com/

8 years ago
0
Level 1

Hi,

Favorite/bookmark system from seblod.com is based on SEBLOD Ecommerce Add-on cart features which will be released next year.

We build a like plugin which will published next year too.

If you wish these features before to be publicly released you can contact SEBLOD team by using seblod.com contact form.

Thanks.

54 Posts
steviec1
8 years ago
0
Level 1

Dear Umair,

It's not the first time this has been discussed in the forum. I search the forum, not by using their search they have, but in Google I write 'site:seblod.com bookmark favorite'. I haven't tried the solutions suggested.

28 Posts
shellok
6 years ago
0
Level 1

Decided to renew interest in the subject since the expected Commerce, and did not leave

2 Posts
htmlcolor
6 years ago
0
Level 1
Thank you for your analysis. It is new and different aspects I know before. Looking forward to reading more of your posts
html color

54 Posts
steviec1
6 years ago
1
Level 1

I have made a bookmark before.

I made a new content type, called bookmarks. I placed the form inside the article. The form just had a visible button saying bookmark. It had some hidden fields. One of them, probably the code pack (it was a long time ago), was a php code that took the url, and saved it in a field. Also, i would save the joomla article title, in another field, with another php code. Then id have a list, it would show the article title, and with typography HTML, id add the url as a link. 

I still have the notes somewhere if yall are interested.

28 Posts
shellok
6 years ago
0
Level 2

It would be great if you shared the details

26 Posts
Liggie
6 years ago
0
Level 1

I'm interested too in the notes how to implement bookmarks.

54 Posts
steviec1
6 years ago
0
Level 1

Ok Ok. 

I haven't done this for a while, and Id have to try it first to make sure it work, but this is from memory (plus usig some notes)

Step 1) Make new Content Type, call it Bookmarks.

Step 2) Add some hidden field. Call it URL. Make it like a text field or something. Then you use the CodePack, Before Store I think, and you write this.

$config["storages"]["#__cck_store_form_bookmark"]["bookmarkurl"] = $_SERVER['HTTP_REFERER'];.

If you don't undestand what this means, it basically is a plugin, and this code, after the user clicks 'save bookmark'  will STORE in the field BOOKMARKURL, (which is in the table cck_store_form_bookmark), (which is the content type), IT WILL STORE THE URL. Because that's what

$_SERVER['HTTP_REFERER'];. does. 

Another idea would be , than instead of saving the Url, maybe you could find the id of the article, and save that, and use that later for the url.

Step 2) Add field BookMark Title. Here you need to get the article title to save it, that way that can appear on the bookmark list. Because the bookmarks will be in a List search type, and you will click on the Title to be taken there, which will be a link with the url we saved.

In this case, I think I used this piece of code. I may have used BeforeRender. I'm pretty sure it's ahidden field. If it doesnt wokr, try and integrate it with BeforeStore, using the example above. So instread of $_server... it would be = $articleTitle.

Now I'm not 100% sure if thats the code I used to get the article , but I just tested it, and I think it works. 

$input = JFactory::getApplication()->input;
$articleId = $input->getInt('id');
$article = JTable::getInstance('content');
$article->load($articleId);
$articleTitle = $article->get('title');. 

Then once you get the title, mayb edo something liek this  (in BeforeRender) , $fields['bookmarktitle']->value = $articleTitle;

Step 3) Add another hidden field, to capture the user's ID, so you can filter it in the search. Click on (2) Live, User ID i think. Live Value.

Step 4) Add submit button. Maybe change it to  'bookmark'. 

Step 5) Use the Form pack, to put the form (which is just the button, because the other fields are hidden), in the article. So you can only bookmark from within the article, not from a list. So when you click that submit button, it's going to SAVE a new 'article', with the URL, and the TITLE, and your ID.

Step 6) Make a LIST for the bookmarks. Save a few bookmarks first. You want to filter the search by the CURRENT USER ID, so put that FIELD YOU SET AS YOUR ID, and use that as a live search value. Then IN THE LIST, you JUST WANT the TITLE you saved (that field) . Then you click on HTML Typography , then YOU DO SOMETHING LIKE THIS:

<!--

<a href="/ckk->get('bookmarkURL')->value;">$cck->getvalue('bookmarkTITLE');</a>

-->

THIS makes a LINK, the TITLE is your TITLE, and the URL, is the URL you saved. 

This should work, the problem I think I encountered (which I solved, but i dunno what i did or if this works), is taht URL was attached to the end of MY WEBSITE DOMAIN. SO IT WOULD BE LIKE example.com/http://www.example.com/article1  . BUT THERE'S A WAY AROUND IT, and try this see if it works, otehrwise let me know, and u coudl EVEN TRY doing something like SAVING JUST THE ARTICLE ID, and then USING THAT FOR THE URL by doing something like

-----

If it doesnt work let ME KNOW

Get a Book for SEBLOD