106
RAWR-Designs / Re: RAWR-Tpl-0.1.2 + Archive + Delete + Picture Preview + Create Folder + Rename.
« on: December 17, 2009, 03:30:25 PM »
couldnt this simply be done in the rawr template with the following ? works perfectly for me
with allowing to set for each user the permission to see the new module and which of the entries of Changing Password and Changing Username
i just added this to the template
hope i changed everything correctly my folder structures a lil bit different
then create a new folder in rawr_default and name it user and add a hfs.diff.tpl in it with the code
and add another subfolder name in the folder user with the hfs.diff.tpl
and the last time add a subfolder change in the folder name with the hfs.diff.tpl
i hope i dont missunderstood anything
p.s.
what i have recognized is that when u have an folder or file checked and then f.e. create a new one or rename a folder all the checked folders get deleted even if u dont press the delete button
edit3 :
k got a solution :
just changed the code to this
so i think this happened because it was only one form which submitted all 3 of the possible arguments idk i dont know much about html and javascript but i thougth splitting it into 2 form could solve it and it did ^^ (i hope currently it seems like )
with allowing to set for each user the permission to see the new module and which of the entries of Changing Password and Changing Username
i just added this to the template
hope i changed everything correctly my folder structures a lil bit different
Code: [Select]
--- Other settings:
mod_updates=on
mod_folder_tasks=on
mod_search=on
mod_statistics=on
mod_shoutbox=on
[b]mod_user=on[/b]
sym_ip=on
btn_back=on
Code: [Select]
<script type="text/javascript">
var serverFolder="%folder%";
var serverHost="%host%";
var theme="{.!theme.}";
var mod_folder_tasks="{.!mod_folder_tasks.}";
var mod_statistics="{.!mod_statistics.}";
var mod_shoutbox="{.!mod_shoutbox.}";
[b]var mod_user="{.!mod_user.}";[/b]
//Language Strings
var lv_loading="{.!lv_loading.}";
var lv_advSearch="{.!lv_advSearch.}";
var lv_search="{.!lv_search.}";
var lv_searchAlert="{.!lv_searchAlert.}";
var lv_files="{.!lv_files.}";
var lv_folders="{.!lv_folders.}";
var lv_both="{.!lv_both.}";
var lv_recursive="{.!lv_recursive.}";
var lv_current="{.!lv_current.}";
var lv_root="{.!lv_root.}";
var lv_hideTitle="{.!lv_hideTitle.}";
var lv_showTitle="{.!lv_showTitle.}";
</script>
Code: [Select]
{.if|{.get account||notes key=mod_user.}|
{.if|{.{.!mod_user.}=on.}|
<div class="module">
<div class="modHeading">
<span>
<a href="javascript:pinModule('user');" id="roessi_Link" title="{.!lv_hideTitle.}"><img
class="hide" src="/template/{.!theme.}/images/hide.gif" align="top" alt=""/>
<noscript><img src="/template/rawr_default/images/spacer.gif" width="8" align="top" alt=""/></noscript>
</a>
</span>
Zusatzfunktionen
</div>
<div class="modContent" id="user ">
<iframe src="/template/rawr_default/user/" width="153" frameborder="0"></iframe>
</div>
</div>
.}
.}
then create a new folder in rawr_default and name it user and add a hfs.diff.tpl in it with the code
Code: [Select]
<html>
<head>
<link rel="stylesheet" type="text/css" href="/template/{.!theme.}/code/{.!theme.}_main.css"/>
</head>
<body id="msgBody">
<p>
{.if|{.get account|%user%|notes key=canchangeusername.}|<a href="/template/rawr_default/user/name/">Change Username</a>.}
</body>
</html>
and add another subfolder name in the folder user with the hfs.diff.tpl
Code: [Select]
<html>
<head>
<link rel="stylesheet" type="text/css" href="/template/{.!theme.}/code/{.!theme.}_main.css"/>
{.if not|{.get account|notes key=canchangeusername.}|<meta http-equiv="Refresh" content="1; URL=/template/rawr_default/user/">.}
</head>
<body>
<form name="changename" action="/template/rawr_default/user/name/change/" method="post" id="changename">
<center>
<a>New Username</a>
<input type="text" name="newname" size="17" maxlength="30" id="msgInput" value=""/><p>
<input type="submit" value="Change Name" id="chgnamesubmit"/> <br>
</form>
<a href="javascript:history.back()">Back</a"
</body>
</center>
</html>
and the last time add a subfolder change in the folder name with the hfs.diff.tpl
Code: [Select]
<html>
<head>
{.if not|{.get account|notes key=canchangeusername.}|<meta http-equiv="Refresh" content="1; URL=/template/rawr_default/user/">.}
<link rel="stylesheet" type="text/css" href="/template/{.!theme.}/code/{.!theme.}_main.css"/>
<script type="text/javascript">
alert ("Your Username has been Changed")
window.location = "/template/rawr_default/user/"
{.set account||newname={.postvar|newname.}.}
</script
</head>
<body>
</body>
</html>
i hope i dont missunderstood anything
p.s.
what i have recognized is that when u have an folder or file checked and then f.e. create a new one or rename a folder all the checked folders get deleted even if u dont press the delete button
edit3 :
k got a solution :
just changed the code to this
Code: [Select]
[b]<form method='post' id='filelist'>%list%.}[/b]
</table>
{.if|{.and|{.get|can delete.}{.get|can archive.}|{.or|%number%|.}.}|
<input type='hidden' name='action' value='delete'>
<input style="margin-left:15px; margin-top:13px;" type='checkbox' onclick='var is =
document.getElementsByName("selection"); for (var i=0; i < is.length; i++) is[i].checked =
this.checked;'> <span style="color:#006633;"><b><---- {.!lv_delete2.}</b></span>
{.if|{.get|can delete.}|
<input style='z-index:1; margin-left:1em; margin-top:1px;' type='button' value='{.!lv_delete.}' onclick='return
confirm("{.!lv_delete3.}") && submitAdding("filelist", {"action":"delete"}, "")'>.}
[b]</form>[/b]
{.if|{.get|can archive.}|
<input style='z-index:1; margin-left:1em; margin-top:1px;' type='button' value='{.!lv_archive.}' onclick='return
doArchive();'>.}
/if.}
{.if|{.get account||notes key=cancreatefolder.}|
{.and|{.get|can upload.}|{.{.!create_folder.}=on.}|
[b]<form method='post'>[/b]
<br><br>
<span style="color:#006633;"><b>{.!lv_name_folder.}</b></span>
<input style="z-index:1" type='text' name='fldname' maxlength="50" size="25">
<input style="z-index:1" type='submit' name='createfolder' value='{.!lv_create_folder.}'>.}
.}
{.if|{.get account||notes key=canrenamefolder.}|
{.and|{.get|can upload.}|{.{.!rename.}=on.}|
<br><br>
<input style="z-index:1" type='text' name='oldname' maxlength="50" size="28"
value="{.!lv_old_name.}" onclick="if(this.value=='{.!lv_old_name.}')this.value=''"/>
<input style="z-index:1" type='text' name='newname' maxlength="50" size="27" value="{.!lv_new_name.}" onclick="if
(this.value=='{.!lv_new_name.}')this.value=''"/>
<input style="z-index:1" type='submit' name='renamefile' value='{.!lv_rename.}'>.}.}
[b]</form>[/b]
so i think this happened because it was only one form which submitted all 3 of the possible arguments idk i dont know much about html and javascript but i thougth splitting it into 2 form could solve it and it did ^^ (i hope currently it seems like )