Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions
You are not logged in.
Pages: 1
Hello, good day, thank you for the excellent work they are doing.
They wanted to say something there is a possibility that the browser offers are random?
"LHCBROWSEOFFER"
I have several offers and I need these out randomly as could be done?
In advance thank you very much!
"In short I want to put the random deals: P"
We apologize for any spell fails, not much English.
Last edited by eduardogt (2015-05-04 07:27:56)
Offline
Sorry, but this function does not exists at the moment. If you want it fill github feature request.
Offline
If you can arrange with a small hardcoded hack without comfortable webinterface ...
you may replace line#18+19 (referring to 2.40v) of modules/lhbrowseroffer/getstatus.php with this code
// process identifier before making database request
$identifier = (string)$Params['user_parameters_unordered']['identifier']; // get identifier from widget
if ($identifier && $identifier[0] == 'r') { // if widget passed identifier that starts with 'r' (like random)
$random_number = rand(1, 2); // pool of random numbers between 1 and 2, change upper value according to number of your offers
$identifier = $identifier . (string)$random_number; // add random number to end of identifier
}
if ( $ignorable_ip == '' || !erLhcoreClassIPDetect::isIgnored(erLhcoreClassIPDetect::getIP(),explode(',',$ignorable_ip))) {
$matched = erLhAbstractModelBrowseOfferInvitation::processInvitation(array('l' => $location,'r' => $referer, 'identifier' => $identifier));
Now, if you want to display ... let's say 2 different videos randomly
save video offer no.1 with identifier "rvid1"
save video offer no.2 with identifier "rvid2"
generate widget html with identifier "rvid" <-- without number, because it will be added by getstatus.php now.
compatibility with original code is kept:
1.) as long as you're using no identifier at all
2.) as log as your identifier doesn't begin with letter 'r'
expand the pool of random numbers to your needs: if you want to display video 4 to 13 replace the code with rand(4, 13);
Basically it's working this way.
But to keep the hack safe from Livehelper updates, the correct way would be to create your own extension or make it part of the unbrand extension.
Last edited by zet (2016-03-14 18:32:36)
Offline
Pages: 1