PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   ReviewPost How do I...? (http://www.photopost.com/forum/reviewpost-how-do-i/)
-   -   Show more than one 'random product' on /reviews/index.php? (http://www.photopost.com/forum/reviewpost-how-do-i/129243-show-more-than-one-random-product-reviews-index-php.html)

criscokid December 9th, 2006 10:30 AM

Show more than one 'random product' on /reviews/index.php?
 
How do I show more than one 'random product' on /reviews/index.php?

I can't see a field to add a vlue for this in the config so is it only one? I've had a look at the feature.tmpl template that generates the code for that block but can't make sense of what portions of the code I need to copy / amend to have more than just one product showing up - but I can't make sense of it.

Chuck S December 9th, 2006 10:56 AM

In your sidebar templates change the number in black

Code:

Content visible to verified customers only.

criscokid December 9th, 2006 11:55 AM

Thanks for the speedy reply Chuck. In v3.31 those lines in the relevant templates are shown below - they show three numbers in each line but your code only shows two numbers. SHould there be two or three?

sidebar_leftopen.tmpl
display_gallery("random", "", "", 1, 1, 1);

sidebar_rightclose.tmpl
display_gallery("random", "", "", 1, 1, 2);

Chuck S December 9th, 2006 03:22 PM

change the second number

criscokid December 10th, 2006 07:31 AM

I'm not seeing any change at all... still only one product thumbnail is being shown in the 'random products' block.

Out of curiosity / better understanding - is there any reason why '6' is used and not another number?

Chuck S December 10th, 2006 10:26 AM

Are you sure your changing the right template in the right directory?

If your sidebar is on the left its sidebar_leftopen and if your using vb3 its the one in the vb3enhanced directory under templates. 6 was what I was suggesting you change it to.

I also just checked and I was completely right in my original post. the display_gallery line in sidebar_leftopen is this

Code:

Content visible to verified customers only.
The code can not be as you have stated cause we have not added ajax to reviewpost yet.

criscokid December 30th, 2006 08:34 AM

1 Attachment(s)
I am using vB3 intergration and it's the templates in the vb3enhanced directory that I've been looking at.

display_gallery("random", "", "", 1, 1); is from the regular sidebar_leftopen template
display_gallery("random", "", "", 1, 1, 1); is from the vB3 sidebar_leftopen template - note the extra digit

To make sure we're talking about the same block I've attached a screenshot

Chuck S December 30th, 2006 08:53 AM

Change the second ONE of the 3 ONES to the number you want

criscokid December 30th, 2006 08:59 AM

Unfortunately I'm not seeing any change at all... still only one product thumbnail is being shown in the 'random products' block.

Chuck S December 30th, 2006 09:07 AM

I dont know to explain to you any more plainly that I already have

Code:

Content visible to verified customers only.
That number in bold can be changed to whatever number you wish as long as your editing the correct template

criscokid December 30th, 2006 09:30 AM

I've done exactly what you told me - I'm editing /templates/vb3enhanced/sidebar_leftopen.tmpl - have you tried it? does it work for you?

Chuck S December 30th, 2006 09:48 AM

It works fine for me thanks.

criscokid December 30th, 2006 09:57 AM

Could it have anything to do with any settings in the adminCP? I only have the the 'Recent Reviews' and 'Random Products' showing whereas you have a couple of extra blocks showing.

Chuck S December 30th, 2006 02:55 PM

No you just need to make sure your editing the correct thing.

I mean so what your saying now is you do not have a sidebar running. Your running the undercats.tmpl so there is your issue. Change the line in that template ;)

criscokid December 30th, 2006 05:00 PM

I never said I was running / not running a sidebar - I didn't realise that made a difference. changing that line in the undercats.tmpl does the trick. Thanks for your help on this... even though it took us a while to get there. Cheers! :) :)

Chuck S December 30th, 2006 06:17 PM

Next time you ask such a question try including a picture or site link and things wont take so long :)

criscokid February 27th, 2007 10:14 AM

Is there a way to exclude / only have (thumbs of products showing) from certain categories show in this block?

Here's the code that generates the thumbnails:
Code:

Content visible to verified customers only.
I just need to figure out how to modify it to exclude certain categories - I suspect it's changing 'random' to something else but not sure what - changing it to the "1,2,3" (the selected categories) didn't have the desired effect.

Chuck S February 27th, 2007 03:58 PM

You need to modify directly the queries in the display_gallery function in pp-inc.php

criscokid February 28th, 2007 04:10 AM

I had a look at the code and from what I could make out that's the code that creates the random products photo block... I'm after the random products PAL.

It it is that code that I should be editing I'd appreciate a pointer on what I should be editing - there wasn't anything obvious that I could find.

Chuck S February 28th, 2007 08:52 AM

That function creates all the photo blocks. Good luck with your code hacking


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