JayC
Well-Known Member
Working Tag Add-On Here you go:
How to add:
- Make a new boxtag.tpl file
- Copy and paste this into your tpl file
- Go to your me.php
- Find the center column (under the main me page part)
- Put $tpl->AddGeneric('tagbox');
Small little add on for ubercms, this is what it looks like:
Tag Too Long or short:
Successfully Added:
How to add:
- Make a new boxtag.tpl file
- Copy and paste this into your tpl file
- Go to your me.php
- Find the center column (under the main me page part)
- Put $tpl->AddGeneric('tagbox');
Code:
<?php
$user = dbquery("SELECT * FROM users WHERE id = '" . USER_ID . "'");
$userAccount = mysql_fetch_assoc($user);
?>
<div class="habblet-container ">
<div class="cbb clearfix pixellightblue ">
<h2 class="title">Add Tags!</h2>
<div class="box-content">
<?php
if(isset($_POST['tag']))
{
$tag = filter($_POST['tag']);
if(strlen($tag) < 1 || strlen($tag) > 10)
{
echo '<center><div class="rounded rounded-red"><strong>The Tag must be between 1 - 10 characters.</strong></div></center>';
}else
{
dbquery("INSERT INTO user_tags (user_id,tag) VALUES ('".USER_ID."','".$tag."')");
echo '<center><div class="rounded rounded-green"><strong>Tag Added!</strong></div></center>';
}
}
?>
<div style="text-align: left;">
<div style="padding:5px"><center>
<form name="form" action="" method="post">
<span title="tag">Enter Tag: </span><br />
<input type="text" name="tag" /><br /><br />
<input type="submit" value="Add Tag" class="submit"></center>
</form>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
</div>
</div>
</div></div>
</div>
Small little add on for ubercms, this is what it looks like:
Tag Too Long or short:
Successfully Added: