Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Xanthia Variables List
  • Posted: 15.08.2007, 01:30
     
    AmmoDump
    rank:
    Professional Professional
    registered:
     December 2003
    Status:
    offline
    last visit:
    21.11.08
    Posts:
    2975
    Since this list was placed in a middle of a thread, I decided to move it to its own thread. And Sticky.

    Please feel free to add to the list. If you have questions about anything here, start a new thread.

    Thanks Wendell!

    This list is also available as a PDF (Thanks to Charlie of postnuke-themes.de): http://postnuke-themes.de/index.php?module=Downloads&func=sublevel&cid=3&start=0


    Wendell

    I'm still trying to figure out all the possibilities (man, they seem endless!), but here is what I have so far. Note that these are all for 0.7x series of PN, not sure if or how many of them still work in 0.8 (not to mention that 0.8 has some new ones).


    Code

    GENERAL VARIABLES
    -----------------
    <!--[lang]--> : Language as defined in PN settings
    <!--[charset]--> : Character set as defined in PN settings
    <!--[sitename]--> : Site name as defined in PN settings
    <!--[slogan]--> : Site slogan as defined in PN settings
    <!--[keywords]--> : Meta keywords as defined in PN settings
    <!--[title]--> : Site title as defined in PN settings
    <!--[additional_header]-->
    <!--[modulestylesheet]--> : Use module-specific stylesheets
    <!--[modulestylesheet stylesheet=admin.css modname=Admin]--> : Load specific stylesheet
    <!--[pnml name="_TEXTDEFINE"]--> : Displays text defined in global.php
    <!--[$imagepath]--> : Path to theme images
    <!--[$themepath]--> : Path to theme root
    <!--[opentable]--> : Opens table at 100% width (table/tr/td)
    <!--[closetable]--> : Closes table (td/tr/table)
    <!--[opentable2]--> : Opens table sized to contents (table/tr/td)
    <!--[closetable2]--> : Closes table (td/tr/table)
    <!--[$color1]--> : Color as defined in theme xaninit.php (1-10)
    <!--[strip]--> : Begin stripping whitespace
    <!--[/strip]--> : end stripping whitespace
    <!--[user]--> : Username
    <!--[themeinfo]--> : Theme information
    <!--[literal]--> : Begin pnRender/Xanthia tags off
    <!--[/literal]--> : end pnRender/Xanthia tags off
    <!--[nocache]--> : Begin non-caching of content
    <!--[/nocache]--> : end non-caching of content


    MASTER AND MODULE TEMPLATE VARIABLES
    ------------------------------------
    <!--[$centerblocks]--> : Center blocks
    <!--[$maincontent]--> : Main content (module data)
    <!--[$leftblocks]--> : Left blocks
    <!--[$rightblocks]--> : Right blocks
    <!--[pnbannerdisplay id=""]--> : Banner (specify ID)
    <!--[search]--> : Search box and button
    <!--[search button="Search"]--> : Search box and button (specify button label)
    <!--[search active="faqs, stories" label=$search_label class="pn-normal"]--> : Search box with other options
    <!--[userwelcome]--> : "Hello $username"
    <!--[displaygreeting]--> : "Hello $username" and number of messages (or login if not logged-in)
    <!--[userlogin]--> : Horizontal login (username/password/remember me)
    <!--[userlinks]--> : Links for anonymous users (register/login) and logged-in users (my account/logout)
    <!--[datetime format=_SITEDATETIME]--> : date and time
    <!--[footmsg]--> : Footer message as defined in PN settings
    <!--[nocache]--><!--[pagerendertime]--><!--[/nocache]--> : Render time (if enabled)
    <!--[typetoolv80]--> : Enable TypeTool (please no!)
    <!--[$pagewidth]--> : Page width as set in xaninit.php/Xanthia settings
    <!--[$lcolwidth]--> : Left column width as set in xaninit.php/Xanthia settings
    <!--[$rcolwidth]--> : Right column width as set in xaninit.php/Xanthia settings


    BLOCK-SPECIFIC VARIABLES
    ------------------------
    <!--[$title]--> : Block title
    <!--[$content]--> : Block content


    NEWS ARTICLE- AND INDEX- SPECIFIC VARIABLES
    -------------------------------------------
    <!--[$info.topicname]--> : Topic title
    <!--[$preformat.searchtopic]--> : Topic image
    <!--[$preformat.catandtitle]--> : Category and title
    <!--[$info.title]--> : Article title
    <!--[$info.hometext]--> : Home text
    <!--[$preformat.bodytext]--> : Body text
    <!--[$preformat.notes]--> : Notes text
    <!--[$preformat.fulltext]--> : Full text (home+body+notes)
    <!--[$preformat.readmore]--> : "Read more..."
    <!--[$preformat.reads]--> : Number of reads (preformatted)
    <!--[$info.counter]--> : Number of reads
    <!--[$preformat.send]--> : Send to a friend
    <!--[$preformat.print]--> : Printer-friendly page
    <!--[$preformat.comment]--> : Number of comments
    <!--[$info.fulltext|count_words]--> : Number of words in remainder of article
    <!--[$info.informant]--> : Author
    <!--[$info.longdatetime]--> : date and time (long)
    <!--[$info.briefdatetime]--> : date and time (short)
    <!--[$info.longdate]--> : date (long)
    <!--[$info.briefdate]--> : date (short)
    <!--[$info.sid]--> : Story ID
    <!--[$links.searchtopic]--> : Topic URL (e.g. <a href="<!--[$links.searchtopic]-->">)
    <!--[articleadminlinks sid=$info.sid]--> : Admin links (edit/delete)
    <!--[$info.aid]--> :
    <!--[$info.bodytext]--> :
    <!--[$info.catthemeoverride]--> :
    <!--[$info.cid]--> :
    <!--[$info.cattitle]--> :
    <!--[$info.comments]--> :
    <!--[$info.notes]--> :
    <!--[$info.themeoverride]--> :
    <!--[$info.tid]--> :
    <!--[$info.time]--> :
    <!--[$info.topicimage]--> :
    <!--[$info.topictext]--> :
    <!--[$info.tcounter]--> :
    <!--[$info.unixtime]--> :
    <!--[$info.withcomm]--> :
    <!--[$info.topicid]--> :
    <!--[$info.topic]--> :
    <!--[$info.catid]--> :
    <!--[$info.version]--> :
    <!--[$info.catandtitle]--> :
    <!--[$info.maintext]--> :
    <!--[$info.fulltext]--> :
    <!--[$links.category]--> :
    <!--[$links.comment]--> :
    <!--[$links.fullarticle]--> :
    <!--[$links.searchtopic]--> :
    <!--[$links.print]--> :
    <!--[$links.send]--> :
    <!--[$links.version]--> :
    <!--[$preformat.bytesmore]--> :
    <!--[$preformat.category]--> :
    <!--[$preformat.comment]--> :
    <!--[$preformat.title]--> :
    <!--[$preformat.version]--> :
    <!--[$preformat.more]--> :


    POSTNUKE TABLE-SPECIFIC VARIABLES
    ---------------------------------
    <!--[$tablecontent]--> : Table content



    EXAMPLES
    ========

    Read more image (if applicable)
    -------------------------------
    <!--[if $info.bodytext|count_words gt 0]-->
    <a href="modules.php?op=modload&name=News&file=article&sid=<!--[$info.sid]-->&mode=thread&order=0&thold=0">
    <img border="0" src="<!--[$imagepath]-->/readmore.gif" alt="Read the rest of the story..." />
    </a>
    <!--[else]-->
     
    <!--[/if]-->


    Show full text of first article on homepage
    -------------------------------------------
    <!--[counter name=articlecount assign=articlecount]-->
    <!--[pnvarcleanfrominput name=startnum assign=startnum]-->
    <div class="<!--[if $articlecount eq 1 and $startnum eq '']-->featured-article <!--[/if]-->article-<!--[$info.sid]-->">
      <h2><!--[$preformat.catandtitle]--></h2>
      <small>Filed under <!--[$info.topictext]--> by <!--[$info.informant]--> <!--[$info.time|timeofday]--> of <!--[$info.time|pndate_format:datebrief]--></small>
      <div class="entry"><!--[$preformat.hometext]--></div>
      <p class="postmetadata">
         <!--[if $preformat.readmore neq '']-->
            [ <!--[$preformat.readmore]--> ]
       <!--[/if]-->
      </p>
    </div>


    Show content if user is admin
    -----------------------------
    <!--[pnsecauthaction realm="0" comp="::" inst="::" level="ACCESS_ADMIN" assign="admin"]-->
    <!--[if $admin eq 2]-->
    my code
    <!--[/if]-->


    Show content if user is logged in
    ---------------------------------
    <!--[if pnuserloggedin($loggedin) eq 1]-->
    logged in code
    <!--[else]-->

    not logged in code
    <!--[/if]-->


    Show content if user is using English language
    ----------------------------------------------
    <!--[pnusergetlang assign='lang']-->
    <!--[if $lang eq "eng"]-->
      <!--[include file='yourtemplate_eng.htm']-->
    <!--[else]-->
      <!--[include file='yourtemplate_persian.htm']-->
    <!--[/if]-->


    Using an IE-specific css file
    -----------------------------
    <!--[literal]--><!--[if lte IE 6]><!--[/literal]-->
    /style/ie.css" />
    <!--[literal]--><![endif]--><!--[/literal]-->


    Truncate content
    ----------------
    <!--[$preformat.catandtitle|truncate:30]-->



    --
    David Pahl
    Zikula Support Team
  • Posted: 15.08.2007, 02:30
     
    nestormateo
    rank:
    Professional Professional
    registered:
     September 2006
    Status:
    offline
    last visit:
    22.11.08
    Posts:
    1451
    Excelent set of resources, plugins and variables to 'engage our development'...
    Thanks both.

    P.S. For performace/memory-usage issues i've unset some of the info, links and preformat in the News module. Things of the past-nuke that came and make load in Xanthia... load that i don't need.
    Xanthia is awesome! icon_cool

    --
    - Mateo T. -
    Mis principios... son mis fines
  • Posted: 15.08.2007, 13:29
     
    Landseer
    rank:
    Steering Committee Steering Committee
    registered:
     January 2003
    Status:
    offline
    last visit:
    12.11.08
    Posts:
    848
    Dave,

    good work, can you put this into the Wiki? IMHO this is a better place if changes/additions are necessary (in .8 some of the data are not existing any longer of have changed). Makes it also easier to add more examples and solutions for common problems.

    Frank


    --
    "He is not dangerous, he just wants to play...."
  • Posted: 15.08.2007, 22:34
     
    Wendell
    rank:
    Professional Professional
    registered:
     February 2004
    Status:
    offline
    last visit:
    01.11.08
    Posts:
    1037
    Oopsie, I think I remember promising to add that to the Wiki... my bad. I will look into it pronto. :)

    Edit: These are actually intended for the 0.7x series as Dave pointed out. I do know that most of the common ones work fine in 0.8, but I can't be certain that they all work. Plus there are several new ones. I may need to get more familiar with the new theme engine before heading to the Wiki.



    edited by: Wendell, Aug 15, 2007 - 09:39 AM

    --
    DWX Logo
  • Posted: 17.08.2007, 04:55
     
    videokid
    rank:
    Professional Professional
    registered:
     March 2003
    Status:
    offline
    last visit:
    19.11.08
    Posts:
    901
    Indeed excellent [I pointed that out a while ago], a good addition to the pnRender Cheatsheet.
    One I use a lot lately is

    Code

    <!--[pnsecauthaction realm="0" comp="YOURMODULENAME::" inst=".*" level="ACCESS_DELETE" assign="delete"]-->
    <!--[if $delete != ""]-->
    <!--[include file="delete_menu.htm"]-->
    <!--[/if]-->

    Interesting if you have some people who are just one under admin icon_smile and you can still use it yourself...

    This can be extended of course...

    - Igor

    --
    Have a nice day
    zikulapro.be is currently running
    Zikula 1.0.2
  • Posted: 19.08.2007, 08:10
     
    rank:
    Freshman Freshman
    registered:
     April 2006
    Status:
    offline
    last visit:
    11.10.08
    Posts:
    48
    Hello AmmoDump,
    i have converted Xanthia Variables to pdf.
    Download :http://postnuke-them…level&cid=3&start=0

    Greetings Charlie

    --
    regards from germany

    postnuke-themes.de My Testsite for Zikula
  • Posted: 19.08.2007, 09:17
     
    AmmoDump
    rank:
    Professional Professional
    registered:
     December 2003
    Status:
    offline
    last visit:
    21.11.08
    Posts:
    2975
    Nice Charlie,

    I have often used your ports for my sites!

    --
    David Pahl
    Zikula Support Team
  • Posted: 30.10.2007, 09:43
     
    viking
    rank:
    Freshman Freshman
    registered:
     December 1969
    Status:
    offline
    last visit:
    26.10.08
    Posts:
    46
    Hi guys.. just asking...

    Code

    <!--[$info.informant]--> : Author


    For this variables, Author get name from "pn_uname"

    Can we make it get from "pn_name"..?

  • Posted: 30.10.2007, 15:03
     
    Topiatic
    rank:
    Professional Professional
    registered:
     November 2003
    Status:
    offline
    last visit:
    06.11.08
    Posts:
    1675
    If you add

    Code

    <!--[ pndebug ]-->
    to the beginning of any template and load the page as admin you will get a nice popup window with all the variables available to that template listed nicely for you.

    --
    Under Construction!

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula