The Arcive of vBulletin Modifications Site. |
|
Details »»
|
|||||||||||||||||||||||||
Oh yes, never again will you have to waste time searching through the template list to find just what you need -- just do a search!
Tested lightly, but it should work. Let me know if you find any bugs! In admin/template.php... Look for: Code:
// ###################### Start modify #######################
if ($action=="modify") {
Code:
// ####################### Search sub ########################
function searchcode() {
print "<p>";
global $like;
if ($like) {
print "<b>Previous Search</b>:\n<br>\n";
$likeout = htmlentities($like);
print $likeout."<p>\n";
$like = addslashes($like);
}
?>
<form action="template.php">
<input type=hidden name=action value=search>
<b>Search for templates containing</b>:<br>
<input type=text name=like size=50><br>
<input type="submit" value="Search Templates!">
</form>
<br>
<?
}
// ###################### Start search #######################
if ($action=="search") {
searchcode();
echo "<p><ul>\n";
$templates=$DB_site->query("SELECT templateid,title FROM template WHERE title<>'options' and template like '%$like%' ORDER BY title");
while ($template=$DB_site->fetch_array($templates)) {
echo "<li>$template[title] <a href=\"template.php?action=edit&templateid=$template[templateid]\">[edit]</a> <a href=\"template.php?action=remove&templateid=$template[templateid]\">[delete]</a></li>\n";
}
echo "</ul></p>\n";
echo "<p>That's all folks</p>\n";
}
Code:
searchcode(); ![]() [Edited by Stallion on 06-18-2000 at 04:09 AM] Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
Hello,
Thanks for the hack! This will bve very useful. ![]() I get an error: Parse error: parse error, expecting `'('' in /home/paintballcity/forums/vb/admin/template.php on line 116 I'm sure I followed the easy directions correctly. Maybe I'm too tired...its late. I'll tackle this in the morning. Thanks again. |
|
#3
|
|||
|
|||
|
Should work now...I had an old version (non-working) of the code in my clipboard when I made the post :/
|
|
#4
|
|||
|
|||
|
ohhh kinky...oh behave...
|
|
#5
|
|||
|
|||
|
uuuhhhm?!?!
|
|
#6
|
|||
|
|||
|
I've been watching too much Austin Powers.
[Edited by VirtueTech on 06-19-2000 at 04:14 PM] |
|
#7
|
|||
|
|||
|
Nice job. Really helps out a lot.
|
|
#8
|
|||
|
|||
|
Gosh, this is a nice hack. Wish I'd installed it a few weeks ago before monkeying around so much with my templates! Thanks very much.
|
|
#9
|
|||
|
|||
|
Stallion:
I am not sure what you mean by "above the first line" and "below the second line". First line or above the Start Modify? Second line or below the if action=modify line? Is that what you mean? Parker |
|
#10
|
|||
|
|||
|
The
Code:
// ####################### Search sub ######################## Code:
// ###################### Start modify ####################### Code:
if ($action=="modify") {
[Edited by Dave Baker on 07-27-2000 at 11:02 AM] |
![]() |
|
|