Wallpaper Script Forum » How-To and Troubleshooting

View page needs wallpaper info url

(24 posts)
  1. Piedra
    Member

    I need to create a link back from view.tpl to the wallpaper info page (wallpaper.tpl)

    Would anyone know how can I grab the url and insert it in view.tpl? Thanks.

    Posted 2 years ago #
  2. Piedra
    Member

    In view.tpl I insert:
    {$items[item].category_path|cat:$items[item].short_name|url:'item'} *found in item.tpl

    It shows simply as: "/"

    I guess I need to somehow make view.tpl recognize these.
    Don't know how yet.

    ----

    I guess I might tell you what my idea is, as you probably see no use in this and lack motivation for finding how to do it:
    - My idea is to insert a share button on the view page, ideally it would share the image info page and not the specific resolution page.

    Thanks!

    Posted 2 years ago #
  3. Can you tell if this is wat you need http://www.latincrib.net

    Posted 2 years ago #
  4. Piedra
    Member

    Will pay 15$ through paypal to the (first) user who posts a working solution (code may be shared here, with the community).

    In view.tpl I need a to generate the url of the image info page.
    No design needed, that's all.

    I know 15$USA is not much, but it's what I can afford right now.
    Thanks.

    Posted 2 years ago #
  5. Are you seriously going to pay 15USD for this changes ?? :)

    what is your website url ?

    Contact me.. !! in my websites contact page..

    Posted 2 years ago #
  6. shekhar
    Member


    Attachments

    1. wall_link.txt (0.1 KB, 36 downloads) 2 years old
    Posted 2 years ago #
  7. @shekhar

    can u tell me how to get link of original wallpaper on wallpaper info page?

    Posted 2 years ago #
  8. shekhar
    Member

    @hollow/Piedra

    what is "wallpaper info page" ????????

    Posted 2 years ago #
  9. @shekhar

    i meant 'wallpaper page'{wallpaper detail page}..

    Posted 2 years ago #
  10. shekhar
    Member

    @hollow...

    Attachments

    1. orig_wall_link.txt (0.2 KB, 25 downloads) 2 years old
    Posted 2 years ago #
  11. Piedra
    Member

    Thanks, almost there!
    The url should be of the html page, not the jpg

    For example, from here:
    http://wallpaperscript.com/demo/view-yoseminte-1024x768.html

    to here:
    http://wallpaperscript.com/demo/yoseminte-wallpapers.html

    Edit: working at it... in a few minutes I think I will have it thanks to Shekhar's code (credit to you)

    *Batu544, I know this is really simple, but as time goes by without any replies, and I spent hours trying to get it right, it make it worth it for me.

    Posted 2 years ago #
  12. Piedra
    Member

    OK, thanks, figured it out:
    {$smarty.const.DOMAIN_NAME}{$wallpaper.short_name|url:"item"}

    You can use it to allow users to share it, sharing the main url instead of specific size:

    <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="{$smarty.const.DOMAIN_NAME}{$wallpaper.short_name|url:"item"}" layout="box_count" action="recommend"></fb:like>

    Posted 2 years ago #
  13. Piedra
    Member

    Alternatively, there is another code you may try (among many, I think I will use this one) :

    <a name="fb_share" type="box_count" href="http://www.facebook.com/sharer.php?u={$smarty.const.DOMAIN_NAME|urlencode}{$wallpaper.short_name|url:"item"|urlencode}&t={$wallpaper.name}
    ">Share<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>

    On hover it looks like it doesn't quite work, but when you actually submit it does share desired url. I have an issue with it not showing the actual share number of the info page, but that's an issue of facebook itself, nothing we can do there as far as I know. Ideally both pages would show same number of shares (maybe my first code above does it, needs testing).

    Posted 2 years ago #
  14. Congrats Piedra .. You did it.. !! :)

    Posted 2 years ago #
  15. hey shekhar can u help me how to get this working?

    im using this php function to show the resolution of orignal wallpapers on wallpaper page but don't know why this not work

    list($width, $height, $type, $attr) = getimagesize($filename);

    i tried
    putting "{$smarty.const.WEB_PATH}walls/{$wallpaper.short_name|urlencode}{$smarty.const.URL_TOKEN_SEPARATOR}{$wallpaper.ratio}.jpg
    "
    as adress of file but this is not working ..

    Posted 2 years ago #
  16. shekhar
    Member

    @hollow
    by resolution u meant somthin like this = 800x600...??
    On which page u wanna sho resolution??

    Posted 2 years ago #
  17. yeah by resolution on

    wallpaper page'{wallpaper detail page}..

    Posted 2 years ago #
  18. Piedra
    Member

    Shekhar, got it working thanks to you, so if you want to claim your prize let me know how I can find your paypal account.

    Posted 2 years ago #
  19. how to convert this into php code?
    what are the rusles

    {$smarty.const.WEB_PATH}walls/{$wallpaper.short_name|urlencode}{$smarty.const.URL_TOKEN_SEPARATOR}{$wallpaper.ratio}.jpg"
    and how to convert php code of WS into code that can be used in template..

    Posted 2 years ago #
  20. shekhar
    Member

    @hollow
    sorry..I can't convert it....and there's no database table for it either

    Posted 2 years ago #
  21. @shekhar,
    i mean to say that this code can only be used in template [{$smarty.const.WEB_PATH}walls/{$wallpaper.short_name|urlencode}{$smarty.const.URL_TOKEN_SEPARATOR}{$wallpaper.ratio}.jpg"]

    but how do i use this in a php command,,because in php it uses something like [$wallpaper['short_name']] instead of [{$wallpaper.short_name}]

    Posted 2 years ago #
  22. shekhar
    Member

    @hollow..
    try this...but m not sure if it works...

    $origimage = {$smarty.const.WEB_PATH}walls/{$wallpaper.short_name|urlencode}{$smarty.const.URL_TOKEN_SEPARATOR}{$wallpaper.ratio}.jpg

    <?php

    list($width, $height, $type, $attr) = getimagesize("$origimage");

    echo "Attribute " .$attr;

    ?>

    OR----------------------

    $origimage = getimagesize("{$smarty.const.WEB_PATH}walls/{$wallpaper.short_name|urlencode}{$smarty.const.URL_TOKEN_SEPARATOR}{$wallpaper.ratio}.jpg");

    <?php

    list($width, $height, $type, $attr) = $origimage;

    echo "Attribute " .$attr;

    ?>

    ALSO---PHP converted----------------------------------------

    $wallpaper['short_name'].URL_TOKEN_SEPARATOR.$ratio_type.".jpg

    OR---------------

    $wallpaper['short_name']."/walls/"URL_TOKEN_SEPARATOR.$ratio_type.".jpg
    OR-----------------------

    SITE_NAME.$wallpaper['short_name'].URL_TOKEN_SEPARATOR.$ratio_type.".jpg

    TRY THIS ONE---------------------------------------------------

    WALLPAPERS_PATH.$file_prefix.URL_TOKEN_SEPARATOR.$ratio_type.".jpg";

    ALSO TRY TO MERGE 1ST STEP($ORIGIMAGE=)WITH PHP CONVERTED URL

    Posted 2 years ago #
  23. shekhar
    Member

    @hollow

    u already did this in ur site...!

    Posted 2 years ago #
  24. yeh, it needed a hardwork,,

    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.