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.
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.
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!
Can you tell if this is wat you need http://www.latincrib.net
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.
Are you seriously going to pay 15USD for this changes ?? :)
what is your website url ?
Contact me.. !! in my websites contact page..
@shekhar
can u tell me how to get link of original wallpaper on wallpaper info page?
@hollow/Piedra
what is "wallpaper info page" ????????
@shekhar
i meant 'wallpaper page'{wallpaper detail page}..
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.
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>
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).
Congrats Piedra .. You did it.. !! :)
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 ..
@hollow
by resolution u meant somthin like this = 800x600...??
On which page u wanna sho resolution??
yeah by resolution on
wallpaper page'{wallpaper detail page}..
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.
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..
@hollow
sorry..I can't convert it....and there's no database table for it either
@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}]
@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
@hollow
u already did this in ur site...!
yeh, it needed a hardwork,,
You must log in to post.