Display QR code directly as small image on ad page

ClassiBase classifieds script Forums General help Display QR code directly as small image on ad page

This topic contains 1 reply, has 1 voice, and was last updated by  ClassiBase 2 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2105 Reply

    cumhur

    Hello ClassiBase,
    I would like to ask if it is possible to make qrcode like small size of and present within page instead open as image? If not, Could you please tell me how I change the place of qrcode button? Thank you

    #2113 Reply

    ClassiBase
    Keymaster

    You can use following snippet in widget on ad page or by editing /user-content/themes/THEME_NAME/views/index/ad.php file

    Example QR code as in page image snippet:

    <?php 
    // get ad
    $ad = self::$_vars['ad'];
    
    if($ad)
    {
    // get qr image url
    $qr = Ad::urlQR($ad);
    
    // change size from 300 pixels to 150pixels 
    $qr = str_replace('chs=300x300', 'chs=150x150', $qr);
    
    // display image 
    echo '<img src="' . $qr . '"/>';
    }
    ?>
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Display QR code directly as small image on ad page
Your information:




This entry was posted on by .