Adding images to your theme: Difference between revisions From Online Manual

Jump to: navigation, search
No edit summary
m (Bot: Automated text replacement (-' +'))
Line 3: Line 3:


<ul class="bbc_list"><li type="disc">bbc: bulletin boards buttons which are used mainly in [[Post]] screens.
<ul class="bbc_list"><li type="disc">bbc: bulletin boards buttons which are used mainly in [[Post]] screens.
</li><li type="disc">english: buttons used in forum&#039;s menu, [[Board index]] , message ..etc.
</li><li type="disc">english: buttons used in forum's menu, [[Board index]] , message ..etc.
</li><li type="disc">icons: icons used in various part of the forum.</li><li type="disc">post: icons used for posts.</li><li type="disc">topic: topics indication images. </li></ul>
</li><li type="disc">icons: icons used in various part of the forum.</li><li type="disc">post: icons used for posts.</li><li type="disc">topic: topics indication images. </li></ul>


Line 10: Line 10:
You can call an image from your [[Theme]] by using:
You can call an image from your [[Theme]] by using:


<div class="codeheader">: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation"></a></div><code>&lt;img src=&quot;&#039;, $settings&#91;&#039;images_url&#039;], &#039;/smflogo.gif&quot; alt=&quot;&quot; /&gt; </code>
<div class="codeheader">: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation"></a></div><code>&lt;img src=&quot;', $settings&#91;'images_url'], '/smflogo.gif&quot; alt=&quot;&quot; /&gt; </code>
where <div class="codeheader">: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation"></a></div><code>&#039;, $settings&#91;&#039;images_url&#039;], &#039;</code> points to your theme&#039;s images folder.
where <div class="codeheader">: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation"></a></div><code>', $settings&#91;'images_url'], '</code> points to your theme's images folder.


or by using:
or by using:


<div class="codeheader">: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation"></a></div><code>&lt;img src=&quot;&#039;, $settings&#91;&#039;images_url&#039;], &#039;/&#039;, $context&#91;&#039;user&#039;]&#91;&#039;language&#039;],  
<div class="codeheader">: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation"></a></div><code>&lt;img src=&quot;', $settings&#91;'images_url'], '/', $context&#91;'user']&#91;'language'],  
&#039;/userinfo.gif&quot; alt=&quot;&quot; /&gt;</code>
'/userinfo.gif&quot; alt=&quot;&quot; /&gt;</code>
Where <div class="codeheader">: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation"></a></div><code>&#039;, $settings&#91;&#039;images_url&#039;], &#039;/&#039;, $context&#91;&#039;user&#039;]&#91;&#039;language&#039;], &#039;</code> points to your theme&#039;s images/english folder, if English is selected as user default language. This will give you the possibility of making another directory for a different language. So, you can have buttons for English and Dutch for example.  
Where <div class="codeheader">: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation"></a></div><code>', $settings&#91;'images_url'], '/', $context&#91;'user']&#91;'language'], '</code> points to your theme's images/english folder, if English is selected as user default language. This will give you the possibility of making another directory for a different language. So, you can have buttons for English and Dutch for example.  


'''Next:''' [[http://docs.simplemachines.org/index.php?topic=223|" class="bbc_link">This is confusing... I just want to change something simple!]]
'''Next:''' [[http://docs.simplemachines.org/index.php?topic=223|" class="bbc_link">This is confusing... I just want to change something simple!]]

Revision as of 10:27, 30 March 2011

To give your Theme a unique look, you may need to modify/add your own graphics to it. The easiest way to add/modify your own graphics is by copying the images folder from the Default theme to your new theme. Once done you can modify or add graphics to (in order of folders):

  • bbc: bulletin boards buttons which are used mainly in Post screens.
  • english: buttons used in forum's menu, Board index , message ..etc.
  • icons: icons used in various part of the forum.
  • post: icons used for posts.
  • topic: topics indication images.

Also the main folder (images) contains various images used in many places in your forum, such as your Theme thumbnail, messenger indicators, stars, etc.

You can call an image from your Theme by using:

: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation"></a>

<img src="', $settings['images_url'], '/smflogo.gif" alt="" /> where

: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation"></a>

', $settings['images_url'], ' points to your theme's images folder.

or by using:

: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation"></a>

<img src="', $settings['images_url'], '/', $context['user']['language'],

'/userinfo.gif" alt="" />

Where

: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation"></a>

', $settings['images_url'], '/', $context['user']['language'], ' points to your theme's images/english folder, if English is selected as user default language. This will give you the possibility of making another directory for a different language. So, you can have buttons for English and Dutch for example.

Next: [" class="bbc_link">This is confusing... I just want to change something simple!]



Advertisement: