image mod modification problem

Powerfull XFileSharing version

Moderator: admin

Message
Author
PowerChaos
Posts: 521
Joined: Dec 19, 2009 5:12 pm
Location: belguim
Contact:

image mod modification problem

#1 Postby PowerChaos » Nov 05, 2010 5:11 am

hi all
i try to edit a few things to fit my needs for the image mod
but i get a lot of trouble when i try to do it

it seems easy but it only works for 50%

it works for what i need it , so the images got the direct links for premium users and normal tags for normal users

but the problem i got , from the moment you put a other file on it (like a pdf file) then only the download button is showed :'(

is it possible to fix for me a template like this

direct link should only be showed to premium members (image )
premium user can get linked to the direct image ( instead tumb it goes to original image)

registered got only acces to tumbs
and guests can not see anything of it (so no links for them)

would be nice if the mod could be upgraded that way or that it can be done by template edits

Thank you
Greetings From PowerChaos

PowerChaos
Posts: 521
Joined: Dec 19, 2009 5:12 pm
Location: belguim
Contact:

#2 Postby PowerChaos » Nov 06, 2010 5:33 am

hmm,
it seems no1 can follow what i mean

lets try to explain it differend
but i can only explain a working version in php but not into the template

i can use those codes

Code: Select all

<?php

if $template ="premium"  || $template ="thumbs"
{
show premium template + image hotlink
}
if $template ="registered" || $template ="thumbs"
{
show registered template + image tumbs hotlink
}
else
{
show normal links
}


not sure if the code is right eather , but thats what i mean

or to explain it easyer
if a premium user log in then he get hotlinking images
if a registered user log in then he get tumb images
if you do not login then you wont get the image options (only file linking)

if it are files ( so not a image) then it shows normal links (direct , forum , html)


now my problem i got with the template
the above option is working with out a problem for the images
but if the file is not a image then it does not show anything else then "download tab"

the forum and html tab is missing (seems it doesnt get executed)

is it possible to provide me a example or the code so i can use a option like this

"if premium AND tumbs"

as i was not able to find that kind of command for the template

it is basicly the only command i am missing to be able to get it working

Thank you
Greetings From PowerChaos

PowerChaos
Posts: 521
Joined: Dec 19, 2009 5:12 pm
Location: belguim
Contact:

#3 Postby PowerChaos » Nov 10, 2010 10:19 pm

in meantime that i was waiting on a answer is here the simple solution
i like to provide it for the other users who like to do the same as i wanted to do (limit the image mod a bit more , so only premium can direct link)

for the upload you need to mess around on your own , as i only show you the download options

if you see in the template , you see a lot of options in it

<tmpl_if premum> = show when premium user
<tmpl_if my_login> = show when logged in user ( premium/regged )
<tmpl_unless premium> = show in case it is not a premium

i know that the code is probaly a bit of a mess , but by lack of a good answer/solution is this the best code you got to start messing around with

hopely the code can help you to modifie your templates to your needs :D
and hopely it can safe a lot of questions from users who want to do the same as me

@admin , if you do not like this post , please remove it

the file is download1.html
use the code at own risk , a bit of html knowledge is needed (i think)
<table cellspacing=0 cellpadding=3 border=0 class="result_slot" width=640><tr><td>
<div class="tabber" style="text-align:left;width:640px;">

<div class="tabbertab">
<h2><TMPL_VAR lang_download_link></h2>
<textarea id="ic0-<TMPL_VAR file_id>" style="width:98%;" cols=24 rows=3 onFocus="copy(this);"><TMPL_VAR download_link></textarea>
</div>
<TMPL_UNLESS my_login>
<div class="tabbertab">
<h2><TMPL_VAR lang_forum_link></h2>
<textarea id="ic1-<TMPL_VAR file_id>" style="width:98%;" cols=24 rows=3 onFocus="copy(this);">[url=<TMPL_VAR download_link>]<TMPL_VAR file_name> - <TMPL_VAR fsize>[/url]</textarea>
</div>
<div class="tabbertab">
<h2><TMPL_VAR lang_html_code></h2>
<textarea id="ic2-<TMPL_VAR file_id>" style="width:98%;" wrap=hard cols=24 rows=3 onFocus="copy(this);"><a href="<TMPL_VAR download_link>"><TMPL_VAR file_name> - <TMPL_VAR fsize></a></textarea>
</div>
</TMPL_UNLESS>


<TMPL_IF my_login>
<TMPL_IF thumb_url>
<TMPL_UNLESS premium>
<div class="tabbertab">
<h2>TumbNail <TMPL_VAR lang_forum_code></h2>
<textarea id="ic1-<TMPL_VAR file_id>" style="width:98%;" cols=24 rows=3 onFocus="copy(this);">[url=<TMPL_VAR download_link>][img]<TMPL_VAR%20thumb_url>[/img][/url]</textarea>
</div>
<div class="tabbertab">
<h2>TumbNail <TMPL_VAR lang_html_code></h2>
<textarea id="ic2-<TMPL_VAR file_id>" style="width:98%;" cols=24 rows=3 onFocus="copy(this);"><a href="<TMPL_VAR download_link>"><img src="<TMPL_VAR thumb_url>" border=0></a></textarea>
</div>
</TMPL_UNLESS>
<TMPL_IF premium>

<div class="tabbertab">
<h2>HotLink</h2>
<textarea id="ic1-<TMPL_VAR file_id>" style="width:98%;" cols=24 rows=3 onFocus="copy(this);"><TMPL_VAR image_url></textarea>
</div>
<div class="tabbertab">
<h2>HotLink <TMPL_VAR lang_forum_code></h2>
<textarea id="ic1-<TMPL_VAR file_id>" style="width:98%;" cols=24 rows=3 onFocus="copy(this);">[url=<TMPL_VAR download_link>][img]<TMPL_VAR%20image_url>[/img][/url]</textarea>
</div>
<div class="tabbertab">
<h2>HotLink <TMPL_VAR lang_html_code></h2>
<textarea id="ic2-<TMPL_VAR file_id>" style="width:98%;" cols=24 rows=3 onFocus="copy(this);"><a href="<TMPL_VAR download_link>"><img src="<TMPL_VAR image_url>" border=0></a></textarea>
</div>
<div class="tabbertab">
<h2>TumbNail</h2>
<textarea id="ic2-<TMPL_VAR file_id>" style="width:98%;" cols=24 rows=3 onFocus="copy(this);"><TMPL_VAR thumb_url></textarea>
</div>
</TMPL_IF>


<TMPL_ELSE>
<div class="tabbertab">
<h2><TMPL_VAR lang_forum_link></h2>
<textarea id="ic1-<TMPL_VAR file_id>" style="width:98%;" cols=24 rows=3 onFocus="copy(this);">[url=<TMPL_VAR download_link>]<TMPL_VAR file_name> - <TMPL_VAR fsize>[/url]</textarea>
</div>
<div class="tabbertab">
<h2><TMPL_VAR lang_html_code></h2>
<textarea id="ic2-<TMPL_VAR file_id>" style="width:98%;" wrap=hard cols=24 rows=3 onFocus="copy(this);"><a href="<TMPL_VAR download_link>"><TMPL_VAR file_name> - <TMPL_VAR fsize></a></textarea>
</div>
<TMPL_IF video_embed_code>
<div class="tabbertab">
<h2><TMPL_VAR lang_emded_code></h2>
<textarea id="ic4-<TMPL_VAR file_id>" style="width:98%;" cols=24 rows=3 onFocus="copy(this);"><IFRAME SRC="<TMPL_VAR site_url>/embed-<TMPL_VAR file_code>.html" FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH=<TMPL_VAR vid_width> HEIGHT=<TMPL_VAR vid_height2>></IFRAME></textarea>
</div>
</TMPL_IF>
<TMPL_IF mp3_embed_code>
<div class="tabbertab">
<h2><TMPL_VAR lang_emded_code></h2>
<textarea id="ic4-<TMPL_VAR file_id>" style="width:98%;" cols=24 rows=3 onFocus="copy(this);"><IFRAME SRC="<TMPL_VAR site_url>/embedmp3-<TMPL_VAR file_code>.html" FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH=480 HEIGHT=20></IFRAME></textarea>
</div>
</TMPL_IF>
</TMPL_IF>
</TMPL_IF>

</div>
</td></tr></table>


the red color is what i have added (and a few things more but i leave that to you to figure that out)

as you can see , it doesnt seems so hard to do , but the problem was that it doesnt works like php so its harder then it looks like to get it done (specialy if it works differend then php and need to switch stuff from places :'( )
and thats why i asked some help , but i got it done now

enjoy and have fun

Greetings From PowerChaos

admin
Site Admin
Posts: 1785
Joined: Mar 22, 2006 12:32 pm

#4 Postby admin » Nov 11, 2010 8:22 pm

PowerChaos, thanks for sharing solution here. I hope it will be helpful for other users.


Return to “XFileSharing Pro”

Who is online

Users browsing this forum: No registered users and 0 guests