Not Solved Template Variables
#1
Not Solved
So, I am slowley getting used to this wonderful board software, I am now going through the template system and it`s a little tricker than I first thought,

In my header template you have the following:

					<ul class="menu top_links">
						<a href="upload.php">Uploader</a>
						{$menu_portal}
						{$menu_search}
						{$menu_memberlist}
						{$menu_calendar}
						<li><a href="{$mybb->settings['bburl']}/misc.php?action=help" class="help">{$lang->toplinks_help}</a></li>
where are the variables defined? in the database?.. in phpbb you have language files and includes, so am trying to work out how to add extra things to the header, you can see in the code provided , I have added a link to my onsite image uploader, but would like this as a variable so it includes an image like the others (calendar, search etc)

Any guidance appreciated.
Reply
#2
Not Solved
if you need image icon with the new link then you can add it with css style code for the link !
header link can be like below
<li><a href="upload.php" class="upload">Uploader</a></li>

upload class can be added to global.css stylesheet of the theme like below
.upload {background-image: url(path/to/iconimage);}

note: edit the stylesheet in forum admin panel (through themes section) AND in advanced edit mode (tab)

remember hard refreshing your browser [eg. press CTRL + F5] on a forum index after saving changes to the stylesheet

variables:
variables are defined in php files.
it would be better to not modify php files to just add links & images
Reply
#3
Not Solved
If you want to create custom variables, then you would need to create a plugin, that way you're not modifying the core files (these files will get updated and you will lose all your precious data). Plugins are the best way to go about this, as you're the one managing them and keeping them up to date with the current version of MYBB
Reply
#4
Not Solved
Consider the following:
http://mybbhacks.zingaburga.com/showthread.php?tid=464

But isn’t required for what you want to achieve as already mentioned by .m.
Soporte en Español

[Image: signature.png]

Discord at omar.gonzalez (Omar G.#6117); Telegram at @omarugc;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)