
Finally, new templates system that will be used for all GD Star Rating renderings is ready. At this point not all rendering is done using T2, but it will be soon, because it requires a lot of testing and tweaking. At this point standard rating for posts and comments are converted to T2 system. Next will follow all custom function, RSS feed render and multi ratings. All that will be done in the next 2 or 3 releases.
Main T2 panel shows all the templates in the database. Some templates can’t delete and that are default templates. You need this, and they are installed when you first install plugin or update from some of the older versions. Beside the name of each template you can see type of the each template. Some of the template types have a value in the tag column, and that means that these templates can be used withing some other templates, some sort of co-dependency. You can filter the list by template type.
Each template can have one or more elements. What element will be used for rendering depend on parameters. In most cases there is one template for each type. But rating text have 3 templates, one normal rendering and 2 if the post rating is time restricted. For each template there is a number of template tags that can be used. With each template element you have a list of tags supported. Also, some of the tags as I mentioned are actual whole templates, and in that case you can see a selection box allowing you to choose with template will be used.
All this will allow you to have multiple templates for each rendering type, and use different ones on different pages or categories (still in works). All functions and shortcodes will be modified to use templates. At this point I still didn’t rewrote all the renderings to use T2, but standard rating block, comment rating block and dependent templates are implemented. Also, because of this, some of the settings are removed. So, you don’t have options to align rating block, because all that will be done using CSS in the templates. This will give you much more flexibility in creating templates to fit the themes.
I know that maybe this looks complicated at first look, but try it and you will see that this much more powerful than previous system. I have added default template selection for posts and pages and comments, so create your own templates and see how they work. In the next week or so, I will add one more post to describe in details creation and use of one template for standard rating block.
loading...







Comment Link
Hi
i am trying to display the Articles by rating on the left side of my wordpress blog.
but unfortunately i am not able to make it working
I scan all the documents of yours and didn’t find how to use template in sidebar
some function i need to call in PHP ?
or use this entire code in sidebar.php
Rating: %RATING%/%MAX_RATING% (%VOTES% %WORD_VOTES% cast)
Rating: %RATING%/%MAX_RATING% (%VOTES% %WORD_VOTES% cast)%TR_MONTHS% months, %TR_DAYS% days, %TR_HOURS% hours, %TR_MINUTES% minutes remaining.
Voting Closed. Rating: %RATING%/%MAX_RATING% (%VOTES% %WORD_VOTES% cast)
Unfortunately nothing is working for me.
A small help from you will be higly appreciated.
Thanks
http://www.meraarticle.com
loading...
Comment Link
There is a sidebar widget for this, and there is a function that does exactly the same thing as the widget, and list of parameters in the user guide.
loading...
Comment Link
Hi Millan,
I was just wondering, when will the feature I suggested here
http://forum.gdragon.info/viewtopic.php?f=9&t=246
be implemented ?
Thanks
Danny
loading...
Comment Link
Multi reviews are implemented from version 1.1.5 or something like that, few weeks ago. I use it myself on my Dev4Press website for plugin reviews.
loading...
Comment Link
Is there any shortcode for templates? I mean, I’ve created a template which is exactly how I need it, but I need to insert it on a text widget. Is this possible? I suppose I’d have to use the same function used for the widget (the widget using that template displays just fine), but how can I know it? Something like [starrating template='#4'] (for example) ?
Thank you,
Dave
loading...
Comment Link
WordPress widgets don’t support shortcodes. Shortcodes can be used only within the post content. All GDSR widgets support templates. And all the widget custom functions support them also. I will publish new documentation in the next week or so.
loading...
Comment Link
Well, I’m quite in a hurry, so (sorry if this bothers you) I’ve found a very fast way to do what I need overwriting the default standar rating results database table with a simpler “pseudo-template” (based on your tags, of course).
I really appreciate your dedication and kindness to answer our questions.
Dave
loading...
Comment Link
Using these custom templates is it possible to have the rating system redirect after voting? If not what java script file do I need to modify to accomplish this?
loading...
Comment Link
No, it’s not. Javascript is devided in several files, and is compiled together based on several rules, so it’s not that easy to change that. Javascript files are in /code/js/ folder.
loading...