1. Create a test html which you can replace with whatever once you see how this works.
- Code: Select all
<html>
<head>
</head>
<body>
Boo
</body>
</html>
2. Save as boo.html and upload this to your phpbb root.
3. Open overall_header.tpl in your templates directory.
4. Find
- Code: Select all
</head>
5. Before this, paste:
- Code: Select all
<SCRIPT LANGUAGE="JavaScript">
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=1000,height=600,left = 140,top = 212');");
}
// End -->
</script>
(you can change the window width/height/position to whatever)
Now to place the link on the main menu: for a link with an image:
6. Find
- Code: Select all
<a href="{U_SEARCH}"
7. Before this
- Code: Select all
<a href="javascript:popUp('boo.html')"><img src="templates/path/to/your/image.gif" width="12" height="13" border="0" alt="boo" hspace="3" />Boo</a>
for a basic text link:
- Code: Select all
<a href="javascript:popUp('boo.html')">Boo</a>
8. Upload your new overall_header.tpl file.
That's it.
If you want another pop-up to have different size etc copy the chunk of java and paste it, give it a 2, like so:
- Code: Select all
<SCRIPT LANGUAGE="JavaScript">
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=1000,height=600,left = 140,top = 212');");
}
function popUp2(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=1000,height=600,left = 140,top = 212');");
}
// End -->
</script>
- and the link would look like:
- Code: Select all
<a href="javascript:popUp2('boo.html')">Boo</a>
Hope this helps, I like to strip things down to their most basic level to work on.
Sam