RegisterRegister    SearchSearch   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AJAX upload progress bar

File sharing script

File mirror script

Newsletter script
image mod modification problem

 
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XFileSharing Pro
View previous topic :: View next topic  
Author Message
PowerChaos



Joined: 19 Dec 2009
Posts: 440
Location: belguim

PostPosted: Nov 05, 2010 5:11 am    Post subject: image mod modification problem Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
PowerChaos



Joined: 19 Dec 2009
Posts: 440
Location: belguim

PostPosted: Nov 06, 2010 5:33 am    Post subject: Reply with quote

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:

<?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
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
PowerChaos



Joined: 19 Dec 2009
Posts: 440
Location: belguim

PostPosted: Nov 10, 2010 10:19 pm    Post subject: Reply with quote

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 Very Happy
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)
Quote:

<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 thumb_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 image_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
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
admin
Site Admin


Joined: 22 Mar 2006
Posts: 1283

PostPosted: Nov 11, 2010 8:22 pm    Post subject: Reply with quote

PowerChaos, thanks for sharing solution here. I hope it will be helpful for other users.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XFileSharing Pro All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group