Download This Theme

Author Topic: [Tutorial] Text Strings  (Read 16512 times)

Offline Runic

  • Co-Founder
  • Hero Member
  • *****
  • Posts: 933
  • Metal!!
[Tutorial] Text Strings
« on: June 07, 2008, 11:32:37 AM »
see one thing that we wish people would do is add there copyright as a txtstring cause atm most are hardcoded, so here is a quick guide on how to do it.  I will use the XD Andromeda theme, that can be purchased on TinyPortalMedia for this demo, simply cause its one ive recently modified and secondly its at hand ;)

Firstly look for the following in index.template.php

Code: [Select]
/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;

Add below that

Code: [Select]
// load custom language strings
loadLanguage('ThemeStrings');

so it will look like:

Code: [Select]
/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;
// load custom language strings
loadLanguage('ThemeStrings');

Now on XD Andromeda you see the following at top and bottom (on the version we have installed)

This is a Demo version, to buy this theme simple click here!!!!


this is done via a text string in this case ive placed it between 2 divs and centered it, however we need the text string, this simply looks like:

Code: [Select]
' ,$txt['buy_now'], '
now we need to create a file in the languages folder, for this guide I will use english, the file should be called ThemeStrings.english.php

Code: [Select]
<?php
// Version: 1.1.4; ThemeStrings

//SMFThemes.org Addition
$txt['buy_now'] = '<h3><a href="http://www.tinyportalmedia.com/main/index.php?action=store;sa=view;id=28">This is a Demo version, to buy this theme simple click here!!!!</a></h3>';
?>


However for other languages you just need to change the .english to your language, for Finnish it would be ThemeStrings.finnish.php etc etc

It would be great if people use this in there themes and if you got any questions please ask :)


Bryan "Runic" Deakin
Co-founder SMF Themes.org
Customiser Simple Machines LLC

 

SMFThemes.org would like to thank Network Redux for providing us with our hosting.
Templates: 3: index (Paper), Site (site_template), Display (default).
Sub templates: 10: init, html_above, site_outside_above, body_above, site_inside_above, main, site_inside_below, body_below, site_outside_below, html_below.
Language files: 1: index+Site+Modifications.english (Paper).
Style sheets: 0: .
Files included: 22 - 622KB. (show)
Cache hits: 10: 0.00522s for 13,072 bytes (show)
Queries used: 19.

[Show Queries]