Sir_Sunstar
ADVANCED USERS ONLY
Xtgem uses twig templates to create the markup of forum blog and guestbook
Twig is a php template engine the documentation for the template development tools is available at
http://twig.sensiolabs.org/doc/templates.html
You do not need a php upgrade to use these twig files
First create a folder named
_xtgem_templates in the main file browser (root)
this folder is where xtgem expects to find the main twig files
Note: to allow the use of "upload by remote server" most of the files have a .js extension this should be removed after upload
Do not edit twig files with the building tool you must use the code editor
FORUM
There are two twig files for the forum the main file
http://syntax.xtgem.com/_templates/xtforum.twig.js
And the blocks file
http://syntax.xtgem.com/_templates/my_blocks.twig.js
both are required
BLOG
The blogs twig fie has a dropbox url
https://dl.dropboxusercontent.com/u/2162515/xtgem_blog.twig
upload this and rename it xtblog.twig
Sir_Sunstar
For Wapmaster That Didnt Know XtGem Getvariables
Nw Here Is An Understandable Tutorial About Xtgem Getvariable!
READ AND ENJOY, DROP COMMENTS AND COMPLAINS..
GETVARIABLE TUTORIAL VIA LINKING:
Nw, lets form a chatt box assumin dis is a chat box code
<input type="text" name="myname" value="myname" />
<input type="text" name="myage" value="myage" />
then if u c dis code and u wnt if u remeber there 2 main values in the chat code and the are myname and myage nw to link it to appear in xame page witout any result page, when a guest is post u wil hav to use Variables so dat it wil also showcase in dat xame page, dat is he talkin...
Now in dat code, lyk i said b4 there are 2 values in the code wich we cn use variable to construct nw c
<input type="text" name="myname" value="{_$myname|}" />
<input type="text" name="myage" value="{_$myage|}" />
to add variable to any code we use dis
{_$|}
dats a variable sign, nw the 2 main values in the chatt box has been constructed wich are
{_$myname|}
and
{_$myage|}
nw dat the variables has been done the chat box when a guest input his name and age then post it wil reload dat xame page , after it must hav paste the guest name and age ...
Nw Link 2 Codes With Variables is xame tin wit the 1 Linkin Tutorial if u dnt wnt it to appear in dat xame page then u useform action wat is "form action" ? it is an automatic link wich link code to its original position. Its jst lyk linkin ur chatroom after u must hav create the file in ur filebrowser!
Nw lets continue there is an example of a code dat has form action first lets use "2go Star Booster" here
<form action="http://UR ACTION LINK" method="get"><br/><input name="star" value="NOVICE" type="radio"><b style=color:blue;->NOVICE</b></input><br/> <select name="action"><option value="None">Select Action</option><option value="TO BOOST">BOOST</option></select><br/><div style="text-align:left;"><b style=color:red;->USERNAME:</b><input type="text" style="width:80px" name="username" /><input type="SUBMIT" value="BOOST" /></form></td>
Nw above is a 2go star boostin code assumin u hav nw paste it in ur site in the placeUR ACTION LINK lets assume ur form action link is boosted nw to make after guest has input the informations in dat boostin code to make it to in the RESULT PAGE Dats dat boosted , bt remeba boosted and Boostedar nt xame when link Y? Becous the differen there is the CAPITAL Letter in front of the letter...
Nw lets continue then to link as i told u b4, u must find in the code the main value in the code b4 constructin.. Wit variables nw here ar the main values in dat 2go boostin codestar ,
action
and
username
nw u construct them usin variable sign
{_$|}
remeba u ar usin 2 link so it wil be lik dis
YOUR STAR IS {_$star|}
YOUR ACTION IS {_$action|}
YOUR USERNAME IS {_$username|}
Remeba dis code should be pasted in the page of boosted dis is the 2go boostin result page linked in rough as an example, in the text box below...
<div align="left"><div class="zxfourborder"><b>YOUR STAR IS :</b><b style=color:red;-> {_$star|}</b>
<b>YOUR ACTION IS :</b><b style=color:green;-> {_$action|}</b><b>
YOUR USERNAME IS :</b><b style=color:black;-> {_$username|} </b></div></div>
Copy code
You Can Give It A Try! For More Details Check
HERE
THATS ALL ABOUT XTGEM GETVARIABLES
All Respect To Lord_Sunstar.
Sir_Sunstar
Random Filelist for pictures
change the folder to urz
carefull when editing
<div class="full"><div class="right"><div class="left" align="center"><img src="http://sunstartech.xtgem.com/Wapmasta/Icon/image.png" alt=" " /><font size="3">FUNNY PICTURES</font></div></div></div><div class="ex"><div class="in"><div class="bodie"><div class="lime2" align="justify">
<!--parser:xtscript-->
#Path to files folder
var $path_to_folder =“Image/Pictures”
# this removes files with no extension
var $filter= *.*
#0 for all items
var $number_of_items = 10
#un-encoded filelist template
var $filelist_template = <a href="/Download?file=.file_name.&name=.file_name_parsed.&type=.file_mime.&size=.file_size.&ext=.file_type.&link=.file_url.&date=.file_date.&time=.file_time.">.file_name_parsed.</a><b> - </b>
# Process variables
var $filelist_template = call htmlspecialchars $val=$filelist_template
if not $number_of_items
var $number_of_items = list.length-1
endif
<!--/parser:xtscript-->
<script type="text/javascript">
function shuffleArray(array) {
for (var i = array.length - 2; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
var temp = array[i];
array[i] = array[j];array[j] = temp;}
return array;}
var list=[<xt:filelist folder="Image/Pictures" template=" '{_$$filelist_template |}', " filter="{_$$filter|}"/>'dummy_entry'];
var list = shuffleArray(list);for(var i=0;i<{_$$number_of_items |};i++){
document.write(list[i]);}</script>
[<a href="Funny pictures">+More</a>]</div>
Copy code
Sir_Sunstar
Random Logo script
change the ones with capital letters to ur image links
dnt change anytin except the image links to avoid error!
<!-- Random image and text script generated from http://sunstartech.xtgem.com -->
<script language="JavaScript">
<!--
aandj = new Array('<div style="background-color:#d0d0d0;border:3px groove #dd0000;padding:10px 10px 10px 10px;"><img src="http://IMAGE LINK1"width="160" height="160"><br /><font style="display:block;font-weight:bold;font-color:#666600;text-align:center;"></font></div>','<div style="background-color:#d0d0d0;border:3px groove #dd0000;padding:10px 10px 10px 10px;"><img src="http://IMAGE LINK2"width="160" height="160"><br /><font style="display:block;font-weight:bold;font-color:#666600;text-align:center;"></font></div>','<div style="background-color:#d0d0d0;border:3px groove #dd0000;padding:10px 10px 10px 10px;"><img src="http://IMAGE LINK3"width="160" height="160"><br /><font style="display:block;font-weight:bold;font-color:#666600;text-align:center;"></font></div>','<div style="background-color:#d0d0d0;border:3px groove #dd0000;padding:10px 10px 10px 10px;"><img src="http://IMAGE LIN4"width="160" height="160"><br /><font style="display:block;font-weight:bold;font-color:#666600;text-align:center;"></font></div>','<div style="background-color:#d0d0d0;border:3px groove #dd0000;padding:10px 10px 10px 10px;"><img src="http://UR IMAGE LINK5"width="160" height="160"><br /><font style="display:block;font-weight:bold;font-color:#666600;text-align:center;"></font></div>');
n=Math.floor(Math.random() * 5);
document.write(aandj[n]);
//-->
</script>
<!-- http://sunstartech.xtgem.com -->
Copy code
Sir_Sunstar
How To Hide Login And Signup knw as xt:auth
just go to ur header and footer and put this code
Sir_Sunstar
Sir_Sunstar XtBlog twig tutorial ..Create a folder named
_xtgem_templates ..inside the folder, click upload Import the below url in the code box via remote server
http://sunstartech.xtgem.com/Twig/xtblog.twig.js
Copy code and rename
xtblog.twig.js to
xtblog.twig then check your blog page!