Vox Populi(x) forum

Alexandria Book Library => Supporto (Support) => Topic started by: A. Wayne Webb on 06 January 2013, 21:05:31

Title: User rating in category listing & other things
Post by: A. Wayne Webb on 06 January 2013, 21:05:31
When I display a category I get the "User rating" line with the five circles.  Also included is an errant bit of coding showing a hash mark (/).  How do I remove it.

Also, I need to convert in the back end the "Pages" field to an alphanumeric data type.  At present it is numeric.  The reason is that some of my books have maps at the back of the book.  I want to display this as "324 w/ map,".

Here is a tip. At present the fields as displayed in the back end are not wide enough to view all of the text entered.  This is easily fixed and the sample below is for the ISBN field.  You will need to edit your administrator template, normally found at <your site>/administrator/templates/<bluestork OR hathor OR system/css/template.css. Copy the file to your computer and edit it by going to the bottom and adding this code:

/* For Alexandria Book Library by Me */
#jform_isbn{width:220px}


Now copy the file back to your server, renaming the old file "template.css_old".  Open your site's back end and create a new book.  You will now be able to enter 10 and 13 digit ISBNs such as "(10) 07-8694-099-9 / (13) 978-0-7869-4099-8", and see the entire string.  Hopefully at some time in the future we will be able to enter each in its own field.  Many, many books in our collections use the older, shorter numbering system.

Cordially
Title: Re: User rating in category listing & other things
Post by: A. Wayne Webb on 08 January 2013, 16:24:39
Quote from: A. Wayne Webb on 06 January 2013, 21:05:31
Also, I need to convert in the back end the "Pages" field to an alphanumeric data type.  At present it is numeric.  The reason is that some of my books have maps at the back of the book.  I want to display this as "324 w/ map,".

I resolved this issue.  If you are not comfortable with making changes to your MySql database, DO NOT ATTEMPT THIS.


You have now made it so that when in the back end of your site you can put any string of text, such as, "256; w/ DM screen, (2) 32-page adventures, 2 die-cut monster token sheets, (2) double-sided maps" and it will be saved and displayed on the front end.  You can view what I am stating on my site (http://spidersrpgworld.com/index.php/home/boradorin-s-library/7-d-d-4th-edition/game-supplements/19-dungeon-master-s-kit).

Cordially
Title: Re: User rating in category listing & other things
Post by: federica on 11 January 2013, 11:39:06
Hi,
thanks for the guide!

QuoteWhen I display a category I get the "User rating" line with the five circles.  Also included is an errant bit of coding showing a hash mark (/).  How do I remove it.
This is not an error, this is the mark of fraction (mathematics).  If there isn't votes it does't show the zero (/0). To fix this inadvertence you have to modify components/com_abook/helpers/icon.php row 131
from
$html .= $rating_count;
to
$html .= count($rating_count);

QuoteHere is a tip. At present the fields as displayed in the back end are not wide enough to view all of the text entered.
I will change in the next version. Thanks for the notice.
Title: Re: User rating in category listing & other things
Post by: A. Wayne Webb on 11 January 2013, 15:12:09
Quote from: federica on 11 January 2013, 11:39:06
$html .= count($rating_count);

QuoteHere is a tip. At present the fields as displayed in the back end are not wide enough to view all of the text entered.

Quote from: federicaI will change in the next version. Thanks for the notice.

Thank you for the reply Federica.  But it did not work.  My code is as below:

$html .= '<span class="content_rating">';
$html .= JText::_( 'COM_ABOOK_VOTE_USER_RATING' ) .':'. $img .'&#160;/&#160;';
//$html .= $rating_count;
$html .= count($rating_count);
$html .= "</span>\n<br />\n";


In a category listing it now looks like the attached image.  Or at least I hope the image was attached.  It's difficult reading Italian for me.  :D  You can see what I am talking about here (http://spidersrpgworld.com/index.php/home/boradorin-s-library/4-fiction-fantasy).

In closing, this is a very nice extension and I said as much on the Joomla extension page for it.  Also, would you like my style.css file?  I made changes and additions that might offer assistance when you revise the code.  I also made some comments in your Suggestions forum.

Cordially,
Wayne

P.S. It might help these old eyes if you change <site>/Themes/default/style.css?b21 somewhere around line 119 or so.  In the <code> class make the font size "small." :D
Title: Re: User rating in category listing & other things
Post by: federica on 12 January 2013, 17:35:04
Ok I will increse the subtitle font size. :-)

Try to delete the joomla cache (if exist) and check if you see the zero after the /.

I see your suggestions about css file in the other post, especially with regard to the cover images dimension. I think it is a good way, I will use it in the next abook version.

Compliments, your site is very nice! Thank you for choosing ABL, I'm very glad.
Title: Re: User rating in category listing & other things
Post by: A. Wayne Webb on 12 January 2013, 19:07:19
Quote from: federica on 12 January 2013, 17:35:04
Ok I will increse the subtitle font size. :-)

Try to delete the joomla cache (if exist) and check if you see the zero after the /.

Compliments, your site is very nice! Thank you for choosing ABL, I'm very glad.

I automatically clean the Joomla cache as well as the browser's cache after making changes.  For the time being I will leave the "/" in place.  The "/ 0" string of text can be confusing to visitors, they not realizing it denotes how many votes were made and the circles are an average.

Thank you for the comment in regard to my catalog.  I try my best when crafting.

As for the stlye.css file, I am attaching it as a text file.  You had some classed declared in your coding that were not declared in the CSS file.  I added them to my version.  This happened to a friend who tests my layout, and I had to answer his question.

Cordially,
Wayne

P.S.  I apologize if at times there are duplicate responses on my part.  I am using Google's translation engine and at times it hiccups on me.