Search question

tubeman
Posts: 534
Joined: Sat Mar 02, 2013 11:33 am

Search question

Post by tubeman »

Hi,
On search template if I want to show a random embed how do I do this?
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: Search question

Post by admin »

<thumb num=1 order=easy_rand> <!--EMBED_CODE--></thumb>
Don't forget to run script update
tubeman
Posts: 534
Joined: Sat Mar 02, 2013 11:33 am

Re: Search question

Post by tubeman »

Hi,
Thanks that worked. Is there anyway to show random number of search queries on a page, from what I see it is fixed now like for example <thumb num=1-50>, so it will show 20 queries per page, if I want it to show any number between 25-50 is it possible?
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: Search question

Post by admin »

We won't be able to change such template
what's the point to have a random number here ?
Don't forget to run script update
tubeman
Posts: 534
Joined: Sat Mar 02, 2013 11:33 am

Re: Search question

Post by tubeman »

Was just checking if we have such functionality. Its just to make the search queries look more random than fixed. Any way we can do this in php?
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: Search question

Post by admin »

an easy way if to output that into php array

like

<thumb num=1-50>
<?php
$somearray[] = 'gallery data';
?>
</thumb>

and then output random number if elemetns from $somearray

this way we can cache $somearray
Don't forget to run script update
tubeman
Posts: 534
Joined: Sat Mar 02, 2013 11:33 am

Re: Search question

Post by tubeman »

What code do I put exactly in $somearray[] and how do I output a random number?
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: Search question

Post by admin »

Exactly what you need to output ..
the question is like "what should I put into template?" depends on what you need, i don't have a ready-made code for you
Don't forget to run script update
tubeman
Posts: 534
Joined: Sat Mar 02, 2013 11:33 am

Re: Search question

Post by tubeman »

How do get I gallery data elements in $somearray[]?
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: Search question

Post by admin »

$somearray[] = '<!--GALLERY_ID--> and other tags as usual';
Don't forget to run script update
Post Reply