The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
What I'm working on is changing the Forum Rules, in some places, from the actual list of rules, to a link that will pop up a window with the rules there. Sort of like the Get More link in the smilies box.
The specific problem I'm having is getting the forumid through the system, so it will be able to figure out just what exactly the rules are. Here's what I have so far. The link I am using to open the popup is this: PHP Code:
PHP Code:
PHP Code:
PHP Code:
Code:
<script language="Javascript" src="vbcode.js"></script> Can someone please help me with this? |
#2
|
|||
|
|||
I'm pretty sure the forum array is not passed in to the vbcode.js file
just pass in the forum id the way you pass in the width, height and session hash. That should work. |
#3
|
||||
|
||||
Ahh... could you please be a bit more specific on how to do that? You see, I don't actually know what I'm doing!
|
#4
|
||||
|
||||
I tried making the link like this:
PHP Code:
(Note: Of course the real links do not have the space in between java and script.) |
#5
|
|||
|
|||
PHP Code:
Code:
function showforumrules(x,y,sessionhash,forumid) { window.open("misc.php?action=showforumrules&forumid="+forumid+"&s="+sessionhash, "smilies", "toolbar=no,scrollbars=yes,resizable=yes,width="+x+",height="+y); } |
#6
|
||||
|
||||
Well, the forumid number now shows up in the link, but when I click on it, it just says "Error on page" (at the bottom of IE).
|
#7
|
|||
|
|||
I'm right, i ain't not javascript expert =D
Code:
function showforumrules(x,y,sessionhash,forumid) { window.open("misc.php?action=showforumrules&forumid="+forumid+"&s="+sessionhash, "smilies", "toolbar=no,scrollbars=yes,resizable=yes,width="+x+",height="+y); } |
#8
|
||||
|
||||
Can someone please help?
|
#9
|
|||
|
|||
did you add the java in the styles area, such as in the header area>? Most of the java has to go in that area, or you get a error everytime. Just rite above the <meta blah blah blah>
info. |
#10
|
|||
|
|||
basically, this part would go into your styles area...above the meta tag stuff...
<!-- Pop Up--> <script language=javascript> <!-- function showforumrules(newin) { flyout=window.open(newin,"flyout","resizeable=no,s crollbars=no,toolbar=no,width= 400,height=360,top=50,left=190") } // --> </script> than, the next part would be something like this, added where you would want a form button basically.....(can use image to...not just a button, so it could go in your main menu of your forums) <form> <input type="button" name="Submit" value="Rules" onclick="showforumrules('misc.php?s=$session[sessionhash]&action=showforumrules&forumid=$forumid')"> </form> Im thinking your missing something though, because getinfo uses a $userinfo[userid] at the end of the script, and $forumid by itself doesnt look rite.... |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|