PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Photopost Pro How Do I...? (http://www.photopost.com/forum/photopost-pro-how-do-i/)
-   -   Random photos block at top of index page (http://www.photopost.com/forum/photopost-pro-how-do-i/123348-random-photos-block-top-index-page.html)

firstrebel February 26th, 2006 10:46 AM

Random photos block at top of index page
 
I couldn't find any previous post that answered my question on this.

I want to put a block of 4 or 5 random photos at the top of my Photopost index page above the category list. At the moment it is a block of 2 near the bottom. I can't even remember how I got it there.

Thanks

Bob

Chuck S February 26th, 2006 11:22 AM

You would need to move your random photo block up on showgallery.php like so and make sure to remove the call lower in the file

Code:

Content visible to verified customers only.

firstrebel February 26th, 2006 11:38 AM

Am I moving all that code or only the code in bold? Also, where do I move it to if I want it above the category list.

Bob

Chuck S February 26th, 2006 11:59 AM

I posted the code above where it would go ;)

firstrebel February 26th, 2006 12:54 PM

Quote:

if ( $cattype == 'c' && empty($si) && empty($ppuser) ) {
if ( $Globals['features'] == "yes" && ($Globals['mostrecent'] == "yes" && $Globals['recentdefault'] == "no") ) {
display_gallery("latest", "", $cat);
}
if ( $Globals['disrandom'] == "yes" ) {
display_gallery("random", "", $cat);
}
}

// Cell alignment
$aligntb = ( $thumbsonly > 0 ? "middle" : "bottom" );

if ( $thumbsonly == 1 ) {
$views = "<option value=\"0\">{$Globals['pp_lang']['gallery']}</option><option value=\"1\" selected=\"selected\">{$Globals['pp_lang']['thumbnail']}</option><option value=\"2\">{$Globals['pp_lang']['withtitles']}</option><option value=\"3\">{$Globals['pp_lang']['groupby']}</option><option value=\"4\">{$Globals['pp_lang']['puzzle']}</option>";
}
elseif( $thumbsonly == 2 ) {
$views = "<option value=\"0\">{$Globals['pp_lang']['gallery']}</option><option value=\"1\">{$Globals['pp_lang']['thumbnail']}</option><option value=\"2\" selected=\"selected\">{$Globals['pp_lang']['withtitles']}</option><option value=\"3\">{$Globals['pp_lang']['groupby']}</option><option value=\"4\">{$Globals['pp_lang']['puzzle']}</option>";
}
elseif( $thumbsonly == 3 ) {
$views = "<option value=\"0\">{$Globals['pp_lang']['gallery']}</option><option value=\"1\">{$Globals['pp_lang']['thumbnail']}</option><option value=\"2\">{$Globals['pp_lang']['withtitles']}</option><option value=\"3\" selected=\"selected\">{$Globals['pp_lang']['groupby']}</option><option value=\"4\">{$Globals['pp_lang']['puzzle']}</option>";
}
elseif( $thumbsonly == 4 ) {
$views = "<option value=\"0\">{$Globals['pp_lang']['gallery']}</option><option value=\"1\">{$Globals['pp_lang']['thumbnail']}</option><option value=\"2\">{$Globals['pp_lang']['withtitles']}</option><option value=\"3\">{$Globals['pp_lang']['groupby']}</option><option value=\"4\" selected=\"selected\">{$Globals['pp_lang']['puzzle']}</option>";
// $thumbfudge is used to add a few thumbnails per line when using Puzzle view (since we have more room)
$thumbfudge = $Globals['thumbcols'] + 3;
}
else {
$views = "<option value=\"0\" selected=\"selected\">{$Globals['pp_lang']['gallery']}</option><option value=\"1\">{$Globals['pp_lang']['thumbnail']}</option><option value=\"2\">{$Globals['pp_lang']['withtitles']}</option><option value=\"3\">{$Globals['pp_lang']['groupby']}</option><option value=\"4\">{$Globals['pp_lang']['puzzle']}</option>";
}

include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/menubar.tmpl" );

if ( $Globals['sidebar'] == "left" && $Globals['sidebar_global'] == "yes" ) {
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/sidebar_leftopen.tmpl" );
}

if ( $Globals['sidebar'] == "right" && $Globals['sidebar_global'] == "yes" ) {
include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/sidebar_rightopen.tmpl" );
}

$whichgallery = ( $Globals['pplayout'] == "no" ? "categall" : "categories" );
$count = 0;

include( "{$Globals['PP_PATH']}/{$Globals['TMPL_PATH']}/showgallery.tmpl" );

if ( $cattype == "c" && empty($si) && empty($ppuser) ) {
if ( $Globals['features'] == "yes" ) {
if ( $Globals['mostrecent'] == "yes" && $Globals['recentdefault'] == "yes" ) {
display_gallery("latest", "", $cat);
}

if ( $Globals['dispopular'] == "yes" ) {
display_gallery("most_views", "", $cat);
}

// if ( $Globals['disrandom'] == "yes" ) {
// display_gallery("random", "", $cat);
// }
If this is how it should look after then it did not work. The random photos box was still at the bottom and the gallery index page took ages to load. I have reverted to the original showgallery.php file.

Bob

Chuck S February 26th, 2006 01:17 PM

You need to turn on random features in Admin => Index Options

Show Random images on Index page?

firstrebel February 26th, 2006 01:44 PM

Nope, that just put a block under the 'Recent Photos' and 'Most Popular Images', as well as the block of 2 'Random Images' under that.

I want to leave the 'Recent Photos' and 'Most Popular Images' blocks where they are and put the 'Random Images' under the Welcome/Search box bar at the top.

Bob

Chuck S February 26th, 2006 03:10 PM

The edit I provided which is above the category block shows fine on showgallery.php

http://www.volvoclub.org.uk/photopos...ry.php?cat=510

Your talking about your index page do the same sort of edit to index.php

firstrebel February 26th, 2006 03:49 PM

If you read post #1 you will see I stated I wanted this on my index page. The code in put in post #2 is not in index.php

Bob

Tattooz January 26th, 2007 01:26 PM

Exactly what I was looking for, random on top, recent on the bottom!
Thanks
http://www.sillyboymedia.com

snoopy5 April 4th, 2007 05:34 AM

Quote:

Originally Posted by Tattooz (Post 1187726)
Exactly what I was looking for, random on top, recent on the bottom!
Thanks
http://www.sillyboymedia.com

PP 5.62

I do not succedd with this.

I moved the code in bold to the approriate place within showgallery.php, but nothing changes...

Any ideas what i could have done wrong?

This is my php file now, in bold the change:

Code:

Content visible to verified customers only.

snoopy5 April 4th, 2007 09:13 AM

Hi

I found the reason why it is not working. The changes have to be made in index.php.

Look here:

http://www.photopost.com/forum/showt...m+image+on+top

Now it is working...

Finster April 7th, 2007 12:39 PM

At least you got up a highest rated images block on your PhotoPost.

I have PP integrated into vB and have a random image bar on the index page but nobody can seem to tell me how to have a second horizontal bar above that that pulls from highest rated, which is odd, considering you have a version of it.

Sybaris April 7th, 2007 02:39 PM

Quote:

Originally Posted by Finster (Post 1193561)
At least you got up a highest rated images block on your PhotoPost.

I have PP integrated into vB and have a random image bar on the index page but nobody can seem to tell me how to have a second horizontal bar above that that pulls from highest rated, which is odd, considering you have a version of it.

If you show us what you are after we may be able to help you :) I am non to sure what it is you want from your vague description.

Finster April 10th, 2007 10:37 PM

Sybaris,

I currently have a "Random Photos" block. This is pulled from PhotoPost pro integrated into the index page on my vB.

I have seen vB's where they have 2 horizontal image blocks. One is "Random Images" and the other one "Highest Rated" images.

I see in the PhotoPost Pro admin panel a toggle to have a 2nd image bar, and this is checked yes, but it does not make it appear.

I just one to have a "Highest Rated Images" or whatever it can be near the vB top and under that, a "Random Images" bar. The Highest Rated would have to be placed there as a result of members rating other members on individual photos as PhotoPost pro has the feature.

Thanks!

anhnhxxi May 9th, 2007 04:02 AM

hi sybaris,

Could you please show the codes that show rating and vote on image block?

Thanks

skidpics March 7th, 2008 11:43 AM

Quote:

Originally Posted by Chuck S (Post 1150421)
You would need to move your random photo block up on showgallery.php like so and make sure to remove the call lower in the file

Code:

Content visible to verified customers only.


Copy and pasted just as shown, and I am not seeing any results other than the most recent at top still. Random enabled, showing at the usual bottom location.

here is the test site: http://skidpics.com/galleries

skidpics March 7th, 2008 12:25 PM

Guess I should have read more. To display the random block on the main page, you have to edit the index.php instead..not the showgallery.php file..

Chuck S March 7th, 2008 01:59 PM

Yep the thread initially was how to move the random block to the top on showgallery not index so if you want to do it to index you do pretty much the same just move the bold part up to where the latest display_gallery switch is.

skidpics March 8th, 2008 01:02 AM

I figured that after reading a bit. Okay, got all the implemented. How can I fix the showgallery.php recent and random to show below the menu bar instead of acting like a header for showgallery.

On the index page, the navigation bar (search,etc.) is above all the thumbs. In showgallery, the recent and random (as tweaked) go above this area..

http://skidpics.com/galleries (index) correct way
http://skidpics.com/galleries/showgallery.php/cat/698 (category, incorrect way)


All times are GMT -5. The time now is 01:02 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