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