diff options
Diffstat (limited to 'template')
| -rw-r--r-- | template/banner.st | 3 | ||||
| -rw-r--r-- | template/form_login.st | 2 | ||||
| -rw-r--r-- | template/profile.st | 2 | ||||
| -rw-r--r-- | template/search_files.st | 29 | ||||
| -rw-r--r-- | template/tagged_dumps.st | 1 |
5 files changed, 26 insertions, 11 deletions
diff --git a/template/banner.st b/template/banner.st index 3339fc2..ea7c826 100644 --- a/template/banner.st +++ b/template/banner.st @@ -33,6 +33,7 @@ a.img_roll:hover{ <a href="http://dump.fm/log" ><img src="/static/img/log.gif"width="20px" height="20px">♣ Log</a> <a href="http://dump.fm/$user_nick$">$if(user_avatar)$<img src="$user_avatar$" width="19px" height="19px" />$else$<img src="/static/img/profile.gif"width="22px" height="22px" />$endif$♥ Profile</a> <a href="http://dump.fm/directory"><img src="/static/img/directory.gif"width="20px" height="20px" />♠ Directory</a> + <a href="http://dump.fm/$user_nick$/favorites">❤ Favs</a> <a href="http://dump.fm/browser"><img src="/static/img/image_draw.gif"/>♦ Image Search</a> $else$ @@ -50,7 +51,7 @@ a.img_roll:hover{ <div id="topic"></div> - <div id="dumplist"> dump.fm - let pictures do the talking $if(user_nick)$- <a href="http://dump.fm/$user_nick$/favorites">my favorite pics</a> -<a href="http://bieber.dump.fm"> - justin bieber </a>$endif$ $if(isadmin)$ + <div id="dumplist"> dump.fm - let pictures do the talking $if(user_nick)$<a href="http://bieber.dump.fm"> - justin bieber </a>$endif$ $if(isadmin)$ <a href="http://news.dump.fm">- news</a> - <a href="http://gossip.dump.fm">gossip</a> - <a href="http://art.dump.fm">art</a> - <a href="http://gif.dump.fm">gif</a> - <a href="http://design.dump.fm">design</a> - <a href="http://fashion.dump.fm">fashion</a> diff --git a/template/form_login.st b/template/form_login.st index 33d240d..4d78b20 100644 --- a/template/form_login.st +++ b/template/form_login.st @@ -19,7 +19,7 @@ <p class="remember"><br> -<input id="signin-submitform" value="Sign in" tabindex="6" type="submit"> +<input id="signin-submit" value="Sign in" tabindex="6" type="submit"> <br><br> <label> <input type="checkbox" name="rememberme" id="remembermeInput" checked="checked"/> diff --git a/template/profile.st b/template/profile.st index 97394aa..33d9b40 100644 --- a/template/profile.st +++ b/template/profile.st @@ -73,7 +73,7 @@ <br> - <a href="http://dump.fm/u/$nick$/favorites"><h7>$nick$'s <br>Favorite Pix</h7></a> + <a href="http://dump.fm/$nick$/favorites"><h7>$nick$'s <br>Favorite Pix</h7></a> <div id="date"> <div type="text" id="datepicker"></div></div> diff --git a/template/search_files.st b/template/search_files.st index f726364..d3deea5 100644 --- a/template/search_files.st +++ b/template/search_files.st @@ -9,7 +9,7 @@ </head> <body> - <center>search dumps: <input type="text" name="search-query" id="search-query" /></center> + <center>search dumps: <input type="text" name="search-query" id="search-query" /></center><br><br> <center><div id="message"></div><br><br></center> <div id="content"></div> @@ -72,8 +72,15 @@ var imageUrl = imageUrls[i]; if (imageUrl in alreadyGot) continue; alreadyGot[imageUrl] = true - if (imageUrl.indexOf(term) > -1) - images.push(imageUrl) + var validImage = true; + for(var t = 0; t<tokens.length; t++){ + if (imageUrl.toLowerCase().indexOf(tokens[t]) == -1) { + validImage = false; + break; + } + } + if (validImage) + images.push(imageUrl); } } if (images.length == 0) { @@ -83,13 +90,21 @@ } } + var tokens = [] + function doSearch(){ - term = jQuery("#search-query").val().trim() - if (term.length < 3) { + term = jQuery("#search-query").val().trim().toLowerCase() + var rawTokens = term.split(" ") + tokens = [] + for(var t = 0; t < rawTokens.length; t++) { + if (rawTokens[t].length > 2) + tokens.push(rawTokens[t]) + } + if (tokens.length == 0) { setMessage("search query too small") } else { - setMessage("searching for '"+term+"'") - addScript(term) + setMessage("searching for '"+tokens.join(" and ")+"'") + addScript(tokens.join("+")) } } diff --git a/template/tagged_dumps.st b/template/tagged_dumps.st index 4bc271d..f1fd4ad 100644 --- a/template/tagged_dumps.st +++ b/template/tagged_dumps.st @@ -21,7 +21,6 @@ <img style="padding-top: 5px;" height="50" width="50" src="$avatar$"></img> </div> </div> - <hr> $endif$ <h8>$page_title$<br></h8><br> </div> |
