<tag.iqtpi_colors>
<var used_fields = ""><!--- return fields we used, so they are not output twice. --->
<if get.otype EQ "page">
<input type="hidden" style="display:none;" name="1_layout_unsignedint" value="1">
</if>
<if NOT isnumeric(get.user_id) OR get.user_id LT 0><var get.user_id = 0></if>
<if get.otype EQ "people">
<div id="user_people_display" style="padding-right:80px;">
<div> </div>
<var UQ.recordcount = 0>
<if get.user_id GT 0>
<set orb="user" select="user.id,user.name,user.extension" where="user.id = #get.user_id#" maxrows="1">
<setcrawl><var UQ = set></setcrawl>
</set>
</if>
<if UQ.recordcount GT 0>
<input type="hidden" name="1_title" value="#escapeDoubleQuotes(UQ.name)#" style="display:none;">
<input type="hidden" name="1_name" value="#UQ.id#" style="display:none;">
<var used_fields = "title,name,notes,file,gutitle">
<tag.iqtpi_sidebox color="orange">
<div style="padding:5px; overflow:auto; overflow-x:hidden; overflow-y:hidden;">
<div style="float:left; width:120px; height:140px; overflow:hidden;">
<if UQ.extension EQ "jpg" OR UQ.extension EQ "png">
<img src="?&f=user-#UQ.id#&f2=orb-8&picwidth=120" border="0">
<else>
<img src="?f=orb-8&picwidth=120" border="0">
</if>
</div>
<div style="margin-left:128px;">
<if trim(UQ.name) EQ ""><var ttitle = "(untitled)"><else><var ttitle = trim(escapeMarkup(#UQ.name#))></if>
<div><a href="?&o=#get.o#&r=2065&user_id=#UQ.id#">#ttitle#</a></div>
<div style="margin-top:0.2em; color:##444444; font-size:0.86em;">
#ttitle# is <span style="color:black">user-#UQ.id#</span>.
<p style="font-size:1.15em;">Click "Post" to add this user to your "people" list.</p>
</div>
</div>
</div>
</tag.iqtpi_sidebox>
<else>
<tag.iqtpi_sidebox color="orange">
<div style="padding:5px; overflow:auto; overflow-x:hidden; overflow-y:hidden;">
<div style="float:left; width:120px; height:140px; overflow:hidden;">
<img src="?f=orb-8&picwidth=120" border="0">
</div>
<div style="margin-left:128px;">
<div>Unknown User</div>
<div style="margin-top:0.2em; color:##444444; font-size:0.86em;">
iqtpi doesn't know who you are trying to add, because you did not click
an "add person" link.
<ul>
<li>
<div><a href="?&o=#get.o#&r=2065&guide=people">Search for people</a></div>
<p>Find people on iqtpi and click "add person" if you want to add an iqtpi user</p>
</li>
</ul>
</div>
</div>
</div>
</tag.iqtpi_sidebox>
<var used_fields = "BREAK">
</if>
</div>
<div> </div>
</if>
<if NOT isnumeric(get.category_id) OR get.category_id LT 0><var get.category_id = 0></if>
<if get.otype EQ "category">
<!--- what categories do they have already? --->
<tag.iqtpi_categorylist all="1">
<var categorylist = lcase(return)>
<div id="category_display" style="padding-right:80px;">
<div> </div>
<var CQ.recordcount = 0>
<if get.category_id GT 0>
<!--- they already specified a category id and are trying to install a specific
category - does it exist? --->
<set orb="customcategory" select="customcategory.id,customcategory.title,customcategory.name,customcategory.notes,customcategory.extension" where="customcategory.id = #get.category_id#" maxrows="1">
<setcrawl><var CQ = set></setcrawl>
</set>
</if>
<if CQ.recordcount GT 0 AND isValidOrb(CQ.title) EQ 1>
<if listfindnocase(categorylist,trim(CQ.title)) GT 0>
<!--- you already have it! --->
<h3>You have already added a category for "#CQ.title#".</h3>
<p>
You cannot add another category with the same name.
</p>
<var used_fields = "BREAK">
<else>
<input type="hidden" name="1_title" value="#trim(lcase(CQ.title))#" style="display:none;">
<input type="hidden" name="1_name" value="#CQ.id#" style="display:none;">
<var used_fields = "name,title,gutitle,notes">
<tag.iqtpi_sidebox color="green">
<div style="padding:5px; overflow:auto; overflow-x:hidden; overflow-y:hidden;">
<var href = "?&o=#get.o#&r=2065&otype=customcategory&idnum=#CQ.id#">
<div style="float:left; width:120px; height:120px; overflow:hidden; background:white;">
<if CQ.extension EQ "jpg" OR CQ.extension EQ "png" OR CQ.extension EQ "gif">
<a href="#href#"><img src="?&f=customcategory-#CQ.id#&f2=site-#site_id#&picwidth=120" border="0"></a>
<else>
<a href="#href#"><img src="?f=site-#site_id#&f2=site-28&picwidth=120" border="0"></a>
</if>
</div>
<div style="margin-left:128px;">
<if trim(CQ.title) EQ ""><var ttitle = "(untitled)"><else><var ttitle = trim(escapeMarkup(#CQ.title#))></if>
<div><a href="#href#">#ttitle#</a></div>
<div style="margin-top:0.2em; color:##444444; font-size:0.86em;">
#ttitle# is <span style="color:black">customcategory-#CQ.id#</span>.
<p>Click "Post" to add this category.</p>
</div>
</div>
</div>
</tag.iqtpi_sidebox>
</if>
<else>
<var used_fields = "name,title,gutitle,notes">
<h3 style="margin-top:0px;">Which category do you want to add?</h3>
<tag.iqtpi_goofbox>
<div style="padding:5px; overflow:auto; overflow-x:hidden; overflow-y:hidden;">
<!--- let's see those categories. --->
<tag.iqtpi_category_list>
<var cli = GLOBAL.iqtpi_category_list>
<var didacheck = 0>
<set orb="customcategory" select="customcategory.id,customcategory.user_id,customcategory.title,customcategory.name,customcategory.notes,customcategory.extension" where="customcategory.id NOT IN (2,3,4,6,7,0#cli#)" iqtpi_rank="1" maxrows="16" groupby="customcategory.title">
<setcrawl>
<var disabled = ""><var checked = "">
<if listfind(cli,set.id) GT 0>
<var disabled = "disabled">
<elseif didacheck EQ 0>
<var checked = "checked">
<var didacheck = 1>
</if>
<var extrastyle = "">
<if disabled EQ "disabled">
<var extrastyle = "opacity:0.4; filter:alpha(opacity=40);">
</if>
<div style="float:left; width:40%; margin-right:2%; overflow:auto; overflow-x:hidden; overflow-y:hidden; margin-bottom:1em; #extrastyle#">
<var href = "?&o=#get.o#&r=2065&otype=customcategory&idnum=#set.id#">
<div style="margin-left:72px;">
<input #disabled# #checked# type="radio" name="1_name" value="#set.id#">
#escapeMarkup(set.title)# (<a href="#href#">?</a>)
<if listfindnocase("jpg,png,gif",set.extension) GT 0>
<!--- category pic --->
<img src="?&o=#get.o#&f=customcategory-#set.id#&picwidth=64&f2=site-#site_id#" border="0" style="height:1.5em; width:1.5em;">
</if>
<if trim(set.notes) NEQ "">
<p style="color:###GLOBAL.grey#; font-size:0.88em; margin-top:0.2em; padding-left:2em;">
#escapeMarkup(left(set.notes,140))#<if len(set.notes) GT 140> ...</if>
</p>
</if>
</div>
</div>
<if NOT set.currentrow MOD 2>
<div class="subrow_spacer" style="clear:both; font-size:0.1em;"> </div>
</if>
</setcrawl>
</set>
<div style="clear:both;"> </div>
<div align="right">
<a href="?&o=#get.o#&r=2065&guide=category">Find more</a> | <a href="?&o=#get.o#&r=2073&otype=customcategory">Make one</a>
</div>
</div>
</tag.iqtpi_goofbox>
</if>
</div>
<div> </div>
</if>
<if get.otype EQ "customcategory">
<ensure variable="get.q" value="">
<if trim(get.q) EQ "" OR isvalidorb(get.q) NEQ 1><var get.q = "widget"></if>
<tag.fentriss_ul_css>
<var used_fields = "title,name,gutitle">
<h3>New customcategory - PAY ATTENTION.</h3>
<!--- gee, how do you name it? --->
<div class="unit">
<input type="text" name="1_title" id="1_title" style="width:44%;" value="#escapeDoubleQuotes(get.q)#">
<div class="unit_note">
Name of category - <span style="background:##FFFFAA;">use only letters</span> (ex. "widget").
<div style="margin-top:0.2em;">
Try to use singular words, like:
<ul style="font-size:1em; margin-top:0.2em;">
<li>
<div>image</div>
<p>(instead of "images")</p>
</li>
<li>
<div>goose</div>
<p>(instead of "geese")</p>
</li>
</ul>
</div>
<div>
You can also use made-up words:
<ul style="font-size:1em; margin-top:0.2em;">
<li>
<div>blurb</div>
<p>(small advertisements? short poems?)</p>
</li>
<li>
<div>thingy</div>
<p>(for when you just don't know what else to make)</p>
</li>
</ul>
</div>
</div>
</div>
<!--- field list (stored in "name" field) --->
<div class="unit" style="padding-right:80px;">
<b>Items in this category have...</b>
<div style="padding-left:2em;">
<div><!--- title --->
<div><b><input style="font-size:1em;" type="checkbox" name="1_name" value="title" checked> title</b></div>
<p style="color:###GLOBAL.grey#; margin-top:0.2em; padding-left:2em; font-size:0.8em;">
The user will see a small textbox labed "what is it called?"
</p>
</div>
<div><!--- notes --->
<div><b><input style="font-size:1em;" type="checkbox" name="1_name" value="notes" checked> notes</b></div>
<p style="color:###GLOBAL.grey#; margin-top:0.2em; padding-left:2em; font-size:0.8em;">
The user will see a large textarea labeled "type something!"
</p>
</div>
<div><!--- file --->
<div><b><input style="font-size:1em;" type="checkbox" name="1_name" value="file" checked> file</b></div>
<p style="color:###GLOBAL.grey#; margin-top:0.2em; padding-left:2em; font-size:0.8em;">
The user will be able to upload a file.
</p>
</div>
</div>
<p>
If your category needs more than just these simple fields, you can
use your #escapeMarkup(site_title)# account with the <a href="http://routiniverse.com/" target="_blank">Routiniverse Editor</a>
to make custom programs for your category. #escapeMarkup(site_title)# will help users
find your program so they can use your category to its full potential.
</p>
</div>
<div> </div>
</if>
<RETURN used_fields>