Sugekoppen
Forum Replies Created
-
Forum: Reviews
In reply to: [Reusable Content Blocks] Doesn’t really work with WPMLIndeed, changing shortcode ID and using different blocks works just fine on translated posts. The problem is that those blocks aren’t connected using the “translate” button and don’t let the user utilize the Translation Editor.
It also means that you’ll have trouble when trying to include the rcb shortcode directly in the template code. You can hack it by using some conditional code to select different blocks by language, but it’s not optimal.
Forum: Plugins
In reply to: [Favorites] Favorite functionality for taxonomyKyle, thanks for chiming in. I won’t hesitate to call what I did a hack and looking through the code I’d say the FavoriteCount function definitely won’t return correct results if you disable the post check and store non-valid data.
Forum: Plugins
In reply to: [Favorites] Favorite functionality for taxonomyI think generally, it would be nice to have the ability to override the default behaviour and favorite whatever string/data you’d like.
In my case I’ve been working on adding favoriting support to another plugin, WP Pro Quiz. In that plugin, Quizzes and Questions are custom data and not WP posts, so out of the box the Favorites plugin didn’t work.
To support saving the ID’s of those custom data types I had to hack the Favorites plugin. The key is disabling the post check in app/Entities/User/UserFavorites.php in the PostExists($id) function and simply return true always. Now the plugin will both save and retrieve any string you want. There are a few additional steps like changing an intval to strval in FavoriteButton.php and FavoriteCount.php to make the hack work.
For my purposes this works perfectly but as I’m not using all functionalities of the Favorites plugin I can’t guarantee that it’ll work for everything or cause trouble elsewhere.
- This reply was modified 7 years, 5 months ago by Sugekoppen.
Forum: Plugins
In reply to: [Favorites] Favourites list disappearingFrom the above description it’s really hard to help you, as there’s basically no information to go on. Below are some suggestions:
1. Provide a simple step-by-step description to let others reproduce the problem. This would include the exact shortcode or command parameters that you’re using.
2. Describe in detail the problem and the steps you’ve tried to resolve it. E.g. does the shortcode work? Is the problem intermittent or persistent?
3. Tell us which other plugins are running in your setup – any caching plugins? If you disable all other plugins does the problem persist?
4. Provide information about platform; browser, operating system etc.
5. And finally if possible, give us a link to the page in question.
Forum: Plugins
In reply to: [Favorites] favorites on custom search pageLet me see if I understand this: you want to save a favorite of a specific page search URL? Or are you trying to display a Favorite button for each of the page results on the search page?
Forum: Plugins
In reply to: [Favorites] Hanging serverOut of interest – did you inspect or save the cookies by chance?
I don’t really see how the js could cause a server hang; that logic almost certainly is to be found in the PHP part.
If the problem arises again you should describe the exact steps how to reproduce the problem and the state of the WP install. Does the hang happen when a user clicks on something, when loading a page with favorites, etc. Also, do you have any code hooks which interact with the Favorites plugin or is it a vanilla install? Which plugins are you running? Can you provide a link to the site?