PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Photopost Pro How Do I...? (http://www.photopost.com/forum/photopost-pro-how-do-i/)
-   -   Highest Rated Pal SEO Link Wrong (http://www.photopost.com/forum/photopost-pro-how-do-i/141892-highest-rated-pal-search-engine-optimization-link-wrong.html)

LissaE January 29th, 2010 11:32 PM

Highest Rated Pal SEO Link Wrong
 
I've just noticed on my newest gallery that the link in the highest rated pal is wrong...it's missing the category name between the // and so leading to page not found errors. This is when SEO links are activated, the link works fine when I turn it off...and all the other linkages on the page are fine lol

Gallery Home - A Moment In Scrap Gallery

Where would I look to try and fix this? To note...the undercat section of the gallery has been customised but the highest rating pal template hasn't been touched in any way

Using Photopost Pro 7.01 integrated with vBulletin 3.8.4

Chuck S January 30th, 2010 09:57 AM

This line in pp-inc.php in the get_ratingcache function make sure it is this. The variable should be $popcat not $cat

Code:

Content visible to verified customers only.

LissaE January 30th, 2010 12:08 PM

You are da bomb Chuck LOL thanx so much! That took care of it :D

LissaE January 30th, 2010 12:36 PM

Now that that's sorted, I have another question for you lol

The one image it's showing in the highest rated pal hasn't actually been rated so it's showing 0.0 ... it has 2 comments on it though so I am guessing that's why it's showing as the top.

There are a few others that actually have been rated but they only have one comment and they aren't showing at all...is there a way to have the highest rated pal show the photos that actually have ratings, even if it's only one?

Otherwise the pal should be called Most Commented and show the comment count instead LOL

Chuck S January 30th, 2010 12:49 PM

yes the ratings pal is based rating then number of comments descending.

LissaE January 30th, 2010 01:17 PM

lolis there any way I can change that then? It looks a bit silly showing only a photo that has no rating lol

Chuck S January 30th, 2010 01:50 PM

well you would have to change your code to suit your needs in the ratingcache function in pp-inc.php

LissaE January 30th, 2010 01:57 PM

Hmm...I'll have a look lol and see what I can do...and hopefully not kill the gallery LOL thanx :)

LissaE January 30th, 2010 02:02 PM

K so the easy part was having it display rated photos regardless of post count...what in the following would I need to remove/change to have it not show photos with no ratings?

Code:

Content visible to verified customers only.
I'm thinking it has something to do with vcount?
Thanx Chuck :D

Chuck S January 30th, 2010 02:05 PM

How about maybe changing this

Code:

Content visible to verified customers only.
to maybe

Code:

Content visible to verified customers only.

LissaE January 30th, 2010 02:16 PM

Perfect! Thanx so much Chuck...have a wonderful day :D

Chuck S January 30th, 2010 02:28 PM

You too.

LissaE June 6th, 2012 02:35 PM

Hi Chuck, since the upgrade this entire section has changed and nothing displays in the Highest Rated Pal, how can I change that in this code?

Quote:


function get_ratingcache( $cat = 0, $ppuser = 0 )
{
global $Globals, $pplang, $link, $cache;

$catquery = null;
if ( $cat == 500 && $ppuser > 0 )
{
// We want to see all their images
$catquery = "userid=$ppuser";
}
elseif ( $cat > 0 )
{
$catname = $CatPerms['catname'][$cat];
$cattype = $CatPerms['cattype'][$cat];
$catchildren = $CatPerms['children'][$cat];

$catquery = $cat;
if ( $catchildren )
{
$catquery .= ",$catchildren";
}

$catquery = "cat IN ($catquery)";
}
else
{
$catquery = "cat=500";
}

$catquery = " WHERE $catquery $userq";

// Lets get the Most Popular Photos
$queryz = ppmysql_query("SELECT numcom,rating,cat,id,title FROM {$Globals['pp_db_prefix']}photos $catquery ORDER BY rating DESC LIMIT {$Globals['mostpoppal']}", $link);

$tpfound = 1;

while ( list(, $avgrate, $cat, $popid, $poptitle, $popviews ) = mysql_fetch_row($queryz) )
{
$tmptitle = ( strlen($poptitle) > 20 ? substr($poptitle,0,20)."..." : $poptitle );
$tmptitle = htmlspecialchars( $tmptitle );
$poptitle = htmlspecialchars( $poptitle );

$cache['popular']['views'][$tpfound] = number_format($popviews,1);
$avgrate = number_format( $avgrate, 2 );

$tmpurl = construct_newppurl( "showphoto.php", array( 'photo' => $popid ) );
$cache['popular']['link'][$tpfound] = "<a href=\"$tmpurl\" title=\"$poptitle\">&raquo; $tmptitle</a>";


$tpfound++;
}

return;
}

Chuck S June 6th, 2012 03:02 PM

You would need to make sure you have uploaded ALL the new files and templates as everything has changed in the program.

LissaE June 6th, 2012 03:27 PM

I have, the upgrade was completed nicely, just there is nothing showing in the Highest Rated box and there are rated photos and photos with comments.

In previous posts in this thread you gave me help on how to show the most rated photos rather than the most commented photos, but the section of code the change was made in has changed and I don't know what to change there now to get anything to show lol

Chuck S June 6th, 2012 03:36 PM

A community photo gallery - PhotoPost Photo Gallery

well I know the highest rated works in the default code if everything is uploaded. You might need to actually turn off your category cache to dump that.

Basically all the most popular photos does is gets photos out of the photos table based on highest rating to low and shows them.

LissaE June 7th, 2012 05:16 AM

1 Attachment(s)
Not sure why it shows nothing then as I overwrote all the files. I don't like the way it looks in the demo now that I can see it so I have just disabled it LOL

I have another question though, in the Top Posters Pal there are two blank cells at the bottom, this also shows on your demo. Can I remove them?

Attachment 5550

Chuck S June 7th, 2012 08:50 AM

I am not really sure I see nothing in the code that should be printing out an extra row and if I run the query in phpmyadmin I only get x number of results.

I will see what I can find.

LissaE June 18th, 2012 04:42 AM

Could have sworn I replied to this lol thanx Chuck....did you have a chance to look into this yet?

Chuck S June 18th, 2012 09:01 AM

I have no resolution yet no.


All times are GMT -5. The time now is 11:29 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97