Page 1 of 2
Search question
Posted: Mon Jun 01, 2020 11:16 am
by tubeman
Hi,
On search template if I want to show a random embed how do I do this?
Re: Search question
Posted: Mon Jun 01, 2020 12:26 pm
by admin
<thumb num=1 order=easy_rand> <!--EMBED_CODE--></thumb>
Re: Search question
Posted: Thu Jun 04, 2020 3:38 am
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?
Re: Search question
Posted: Thu Jun 04, 2020 6:38 am
by admin
We won't be able to change such template
what's the point to have a random number here ?
Re: Search question
Posted: Thu Jun 04, 2020 10:57 am
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?
Re: Search question
Posted: Thu Jun 04, 2020 11:11 am
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
Re: Search question
Posted: Thu Jun 04, 2020 11:20 am
by tubeman
What code do I put exactly in $somearray[] and how do I output a random number?
Re: Search question
Posted: Thu Jun 04, 2020 11:31 am
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
Re: Search question
Posted: Thu Jun 04, 2020 12:02 pm
by tubeman
How do get I gallery data elements in $somearray[]?
Re: Search question
Posted: Thu Jun 04, 2020 12:12 pm
by admin
$somearray[] = '<!--GALLERY_ID--> and other tags as usual';