Star rating and Media extension?

Discuss PivotX 2.0.x extensions here, and view extensions that are available for download.

Star rating and Media extension?

Postby Harm10 » Fri Sep 18, 2009 6:30 pm

I activated both Star rating and Media extension in the configuration.
Both how to work with them?
Does anyone have samples for these extensions? :?:
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Star rating and Media extension?

Postby hansfn » Sat Sep 19, 2009 6:20 am

media: Read pivotx/extensions/media/README.txt
starrating: Just experiment with [[star]] and [[ratingscore]] in your template. (Don't forget to configure the extension.)

The extension documentation will be unstructured/incomplete until http://extensions.pivotx.net/ is up and running. Sorry.
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Star rating and Media extension?

Postby Harm10 » Sat Sep 19, 2009 3:15 pm

Tried star rating.
Some things either I don't understand or are not working correctly.

1. In the configuration of Star rating the help with the "ratingscore" description states that you can use %count% and %average%.
In fact only %average% is translated, %count% is not. Is this a bug in the rating itself or in the help description?

2. If you code
Code: Select all
[[star]]
[[ratingscore]]
Six (?) stars appear followed by the "star" description and the "ratingscore" description.

If you code
Code: Select all
[[star]]<br/>
[[ratingscore]]
Five (!) stars appear followed by the "star" description; on the next line there is 1 star followed by the "ratingscore" description

If you code
Code: Select all
[[ratingscore]]
so without [[star]]
A non breaking space appears after the text that's produced by the last line followed by the "ratingscore" description.

If you code
Code: Select all
<br />[[ratingscore]]
so without [[star]]
The "ratingscore" is on the next line but still starting with a non breaking space.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Star rating and Media extension?

Postby hansfn » Sun Sep 20, 2009 7:02 am

Oh, this isn't a mystery at all. The non breaking space produced by the ratingscore tag is converted to a star (by CSS). That explains why you get what seems to be 6 stars, but it is really 5+1. Normally you would not put these two tags next to eachother ...

Thx for the "%count%" bug report - it was en error in the help text. That and some other minors issues were fixed in revision 2141 and in revision 2142.
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Star rating and Media extension?

Postby Harm10 » Wed Sep 23, 2009 7:18 pm

Implemented both revisions and the star belonging to [[ratingscore]] is now always visible. So good work there!
But...... although you state that [[star]] and [[ratingscore]] are not supposed to be used next to each other I still think something is wrong with [[ratingscore]].
When I code
Code: Select all
[[more]]
[[ratingscore]]
The result is a line starting with a star followed by the text produced by [[more]] and that followed by the ratingscore text (all on 1 line).
When I code
Code: Select all
[[more]]<br />
[[ratingscore]]
everything looks OK (so 2 lines).
So could you take another look? And while you're at it maybe put a blank between the star and the ratingscore description? Or is the admin supposed to type an extra blank when he (or she :mrgreen: ) wants some distance between the star and the text?
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Star rating and Media extension?

Postby hansfn » Wed Sep 23, 2009 9:24 pm

All your issues can be fixed by altering the CSS - I'm sorry but I don't have time to tune it for your needs.
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Star rating and Media extension?

Postby Harm10 » Wed Sep 23, 2009 10:16 pm

Alright, understandable. I'll take a look myself and try to correct the position of the star.gif which shouldn't be always be at the beginning of the line.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Star rating and Media extension?

Postby Harm10 » Thu Sep 24, 2009 9:58 pm

I took a look at the css of this. It all works with fixed positioning of a background image.
So this one will never work correctly when concatenated with something else on the same line.
As a background image can't be positioned relatively (according to my knowledge) I thought it better to change snippet_star.php
For both [[star]] and [[ratingscore]] you have to make sure that their coding starts on a new line.
This can easily be achieved by putting in a line break on line 89 and line 144 (in front of the rest of the coding on that line).
Putting some space between the star.gif and the description one can achieve by putting a non breaking space in front of %description% on lines 98 and 144.
I think that solves all your (and mine) problems....... :mrgreen:
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Star rating and Media extension?

Postby hansfn » Thu Sep 24, 2009 10:54 pm

I took a look at the css of this. It all works with fixed positioning of a background image.
So this one will never work correctly when concatenated with something else on the same line.

Wrong. It's fixed inside the span, but not on the page. The reason it's ending up on the left is because there is a "float: left" present in the CSS. Hint: Try replacing "float: left" with "display: inline-block".
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Star rating and Media extension?

Postby Harm10 » Fri Sep 25, 2009 5:03 am

hansfn wrote:
I took a look at the css of this. It all works with fixed positioning of a background image.
So this one will never work correctly when concatenated with something else on the same line.

Wrong. It's fixed inside the span, but not on the page. The reason it's ending up on the left is because there is a "float: left" present in the CSS. Hint: Try replacing "float: left" with "display: inline-block".

Hmm, I didn't think about that combination. Not sure whether it will work because there are a lot of lines about position in the css so I'll have to try. Will come back on this.....
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Next

Return to 2.x Extensions

Who is online

Users browsing this forum: No registered users and 2 guests

cron