PDA

View Full Version : Help integrating non vB script


Phooey
10-04-2007, 01:20 AM
I got a copy of the MyMovies script (www.mj99.com) and it works great if I run it solo, but i can't seem to integrate in to a page of my forum using the instructions found here (https://vborg.vbsupport.ru/showthread.php?t=98009). I can get it to display the page with all of the vbulletin "wrapping", but then the script doesn't work, or I can get the script to work, but then it just displays the following on the top of the page:
$stylevar[htmldoctype] $headinclude $header $navbar

Anyone have any tips or ideas on how to integrate a non-vBulletin php script in to it's on page on my forums? Before anyone suggests it, no, I'm not interested in using an iframe. Is there a way to have everything contained in a single php file? The template is where it seems to be screwing up.

Here's the location of where I'm trying to get it working: http://www.digitallywise.com/forums/movies.php

Dismounted
10-04-2007, 04:52 AM
<a href="https://vborg.vbsupport.ru/showthread.php?t=62164" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=62164</a>

Phooey
10-04-2007, 10:49 AM
That's essentially the exact same guide that I linked to from Psionic Vision and I'm still having the same issues. Is there a way to make a php vbulletin integrated file without using templates? That seems to be where I'm having the issues.

swrzzzz
10-04-2007, 11:42 AM
I have made pages developed in Smarty run OK when they are called as a page from VBA

Can you do something like that?

Steve

Phooey
10-04-2007, 01:46 PM
I can try, but I have virtually no experience with Smarty.

Essentially, what I'm trying to do is take the mymovies script (which you can see working great here (http://www.digitallywise.com/forums/movies/)) and integrate it in to a vbulletin page so that I can have a "movies.php" file that works the way the base script does, but is integrated with vbulletin so that it displays the header, navbar, footer, etc. This doesn't seem to be working within a template because of the php in the script.

swrzzzz
10-04-2007, 01:52 PM
No Sorry, I didnt mean write in smarty at all

What I meant was I have a vanilla php page (which was incidentally written in Smarty) that I have managed to get working in VBA.

You add it as a page then if you want to you can still have access to the vbulletin variables from within your code.

The main issue is picking up width and styles for the elements you display

Steve

Phooey
10-04-2007, 02:45 PM
That would probably work, how'd you go about integrating the vbulletin stuff in the page? Do you have an example?

swrzzzz
10-04-2007, 03:25 PM
I dont have an example at work its at home...

Go to the VBAdvanced control panel if you have it installed and do "edit page" then point the page to your php file.

You can set it to strip the <head> etc off of your php page or you can take them out of your script - its pretty clear when you get to the right part of the menu. Then your pages get displayed between the forum header and footer.

If you need to see VBulletin variables they are available but in a slightly different form

If you cant make it work I can send you some screenshots and more info, but it wont be for a couple of hours till I get home

Cheers

Steve

Phooey
10-04-2007, 03:48 PM
Tried it, still no go because the script itself has to reload, it isn't ajax. I got it working so that the form appeared on a vbulletin page, but then when you entered your zip code, it reloaded to just the php file. Really, all I need to do is figure out how to take this script and make it also a vBulletin page so that it displays the header, navbar, and footer, with the script itself in between.

swrzzzz
10-04-2007, 04:52 PM
did you set the pageid in links or submits back into your file

ie make links url look like {$SCRIPT_NAME}?pageid=xxxxx&whateveryouwant=myinfo

where xxxxx is your pageid you declared in VBA when you defined the page?

Steve

Phooey
10-04-2007, 06:02 PM
Well, I'm getting closer. If I type in the link full (like this: http://www.digitallywise.com/index.php?page=movies&zipcode=55555 ), then it works great. I'm still having issues where if you type your zip code in to the form, it gets rid of the "?page=movies" part of the URL, which is crucial. The HTML code for the form in the php file looks like this: <form action="index.php?pageid=movies" name="search">

--------------- Added at 15:14 ---------------

ok, I got it working! Now I just have to clean up the HTML and get it looking the way I want. Thanks for the help. :)

Here it is, if you're curious: http://www.digitallywise.com/forums/movies.php

swrzzzz
10-04-2007, 08:36 PM
Cool

Glad it worked - I struggled for days to get to that point :-)

Steve