The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to call style Vb Stylesheet outside vb
okay in postnuke i could use iframes that would allow me to grab the style sheet for the theme i was using so i could use outside scripts to work with my site. now i am trying to bring something into vb right now with vbadvanced as a page but its not working because of how vbadvanced calls pages ?page=whatever.. now for the script it wont work so only way i am thinking is to i frame the script so it just lies within that module and then with a call to the style sheet the member is using i can match the Script to vb theme the current user is using.. see in post nuke i could call it
$theme = pnUserGetVar('theme'); echo "<link rel=\"StyleSheet\" href=\"themes/$theme/style/style.css\" type=\"text/css\">"; echo "<link rel=\"StyleSheet\" href=\"themes/$theme/style/styleNN.css\" type=\"text/css\">"; but in vb i dont know how i could achieve this can anyone help move this thread as well sorry posted in the wrong forum |
#2
|
|||
|
|||
You can store the vbulletin stylesheet as a file, if that's any help
(look at your vBulletin Settings, yes that looong list) |
#3
|
|||
|
|||
i figured it out it has to do with calling the global file then echoing the style
now i need to figure out how to echo the user name on a page outside of vb that wont work with a echo $userinfo[musername] |
#4
|
||||
|
||||
Quote:
PHP Code:
|
#5
|
|||
|
|||
Print out the array $vbulletin->userinfo and see which one stores the username and use that .
*not sure it will work, my memory sucks* edit: Woops Tyler posted while I was posting. Tyler does this echo the formatted username? Cause I thought it was just username for the name but not sure... |
#6
|
||||
|
||||
Quote:
|
#7
|
|||
|
|||
Thanks, nice to know that!
|
#8
|
|||
|
|||
thanks tyler and michelle for the help
Having a little bit more of an issue Code:
<? chdir('/home/httpd/vhosts/httpdocs/Forum'); require_once('./global.php'); ?> <? echo $style['css']; ?> <center><body bgcolor="alt1"> </head> <!--BEGIN WORD FILTER JAVASCRIPT--> <script language="JavaScript"> // Word Filter 2.0 // (c) 2002 Premshree Pillai // Created : 29 September 2002 // http://www.qiksearch.com // http://javascript.qik.cjb.net // E-mail : qiksearch@rediffmail.com var swear_words_arr=new Array("www","http://"); var swear_alert_arr=new Array(); var swear_alert_count=0; function reset_alert_count() { swear_alert_count=0; } function wordFilter(form,fields) { reset_alert_count(); var compare_text; var fieldErrArr=new Array(); var fieldErrIndex=0; for(var i=0; i<fields.length; i++) { eval('compare_text=document.' + form + '.' + fields[i] + '.value;'); for(var j=0; j<swear_words_arr.length; j++) { for(var k=0; k<(compare_text.length); k++) { if(swear_words_arr[j]==compare_text.substring(k,(k+swear_words_arr[j].length)).toLowerCase()) { swear_alert_arr[swear_alert_count]=compare_text.substring(k,(k+swear_words_arr[j].length)); swear_alert_count++; fieldErrArr[fieldErrIndex]=i; fieldErrIndex++; } } } } var alert_text=""; for(var k=1; k<=swear_alert_count; k++) { alert_text+="\n" + "(" + k + ") " + swear_alert_arr[k-1]; eval('compare_text=document.' + form + '.' + fields[fieldErrArr[0]] + '.focus();'); eval('compare_text=document.' + form + '.' + fields[fieldErrArr[0]] + '.select();'); } if(swear_alert_count>0) { alert("Sorry You cant ad this request: found:\n_______________________________\n" + alert_text + "\n_______________________________"); return false; } else { return true; } } </script> <!--END WORD FILTER JAVASCRIPT--> <body topmargin="0" leftmargin="0" bgcolor="alt2"> <? echo $style['css']; ?> <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%"> <tr><td valign="top"> <table border="0" width="100%" bgcolor="tcat" cellspacing="1" cellpadding="3"> <tr> <td width="1%"></td> <td width="99%"><p class="bodycopy"><font color="#FFFFFF"><b>Your request has sucessfully been delivered to the DJ application and should play shortly.</b></font></td> </tr> </table> <table border="0" width="100%" cellspacing="4" cellpadding="4" bgcolor="alt2"> <tr> <td valign="top" align="center"><table border="0" cellpadding="2"> <? if($song["haspicture"]){?> <tr> <td valign="top" align="center"> <br> </td> </tr> <?}?> <tr> <td valign="top" align="center"> </td> </tr> </table> </td> <td valign="top" width="99%"><div align="center"><center> <table border="0" cellspacing="0" cellpadding="3"> <tr><td colspan=2><font size=2><b>Song information</b></font></td></tr> <tr> <td><p class="bodycopy">Artist</td> <td><p class="bodycopy"><? echo $song["artist"]; ?></td> </tr> <tr> <td><p class="bodycopy">Title</td> <td><p class="bodycopy"><? echo $song["title"]; ?></td> </tr> <tr> <td><p class="bodycopy">Album</td> <td><p class="bodycopy"><? echo $song["album"]; ?></td> </tr> <tr> <td><p class="bodycopy">Buy CD</td> <td align="center"><p class="bodycopy"><a href="<? echo $song['buycd']; ?>" target="_blank">Buy Cd</a></td> </tr> </table> </center></div></td> <td valign="top"> <? if($dedicated) require("req/dedication.info.html"); else require("req/dedication.form.php"); ?> </td></tr> </table> </td></tr></table> </body> </html> require_once('./global.php'); when i throw that in it completely kills the page after the call to the global |
#9
|
|||
|
|||
Try:
PHP Code:
|
#10
|
|||
|
|||
If its for a postnuke page, you might find including vbulletin's global file will mess up PHP's enviroment and stop it from working. I cant imagine it doing any real damage anymore since most things are stored inside classes.
You might have to chdir back to the directory your file is located in otherwise it wont be able to require the extra files that are required at the bottom of the code you pasted. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|