2010-11-14, 11:57 AM
Hello people,
In the following tutorial you will learn how to make custom popup links and add them to your header!
Preview:
[attachment=21096]
Go to:
Admin Control Panel>> Templates & Styles>> Templates>> (Your Theme's Name) Templates>> Header Templates>> Header.
Find:
Copy this and paste it again right below, so it looks like:
Now, you will need to replace where "calendar.php" with your file's name and where "{$lang->toplinks_calendar}" with a word.
What about the popup links? Let's make them right now!
Replace the <a href> value with "#" and add the popup window code.The popup window code is shown right below:
Also, you can change 400,200 to your desired width,height so it suits your content. Finally replace >Your File</a> with a word you'd like.
Note that I didn't touch anything in the first line.
All changes have been made in the second line, so do not touch the first line or you'll end with a calendar popup window!
That's all.
Originally posted at MyBB Extras by me.
In the following tutorial you will learn how to make custom popup links and add them to your header!
Preview:
[attachment=21096]
Go to:
Admin Control Panel>> Templates & Styles>> Templates>> (Your Theme's Name) Templates>> Header Templates>> Header.
Find:
<li><a href="{$mybb->settings['bburl']}/calendar.php" class="calendar">{$lang->toplinks_calendar}</a></li>
Copy this and paste it again right below, so it looks like:
<li><a href="{$mybb->settings['bburl']}/calendar.php" class="calendar">{$lang->toplinks_calendar}</a></li>
<li><a href="{$mybb->settings['bburl']}/calendar.php" class="calendar">{$lang->toplinks_calendar}</a></li>
Now, you will need to replace where "calendar.php" with your file's name and where "{$lang->toplinks_calendar}" with a word.
What about the popup links? Let's make them right now!
Replace the <a href> value with "#" and add the popup window code.The popup window code is shown right below:
<li><a href="{$mybb->settings['bburl']}/calendar.php" class="calendar">{$lang->toplinks_calendar}</a></li>
<li><a href="#" onclick="MyBB.popupWindow('{$mybb->settings['bburl']}/yourfile.php','Your File',400,200);">Your File</a></li>
'Your File' is the title of the popup window, it won't be used if you have already defined a name within the document by using the <title> tag.Also, you can change 400,200 to your desired width,height so it suits your content. Finally replace >Your File</a> with a word you'd like.
Note that I didn't touch anything in the first line.
All changes have been made in the second line, so do not touch the first line or you'll end with a calendar popup window!
That's all.
Originally posted at MyBB Extras by me.