The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
imdb integration
Hello,
I have this imdb source that is working fine as in searching and fecthing information from imdb , anyway none of the files that the whole code is based on , i wasnt able to add on any of them the header and/oor footer of vb . Am confused, whenever i try ti include the global.php and the header template they are parsed but my code is not, or vise versa ! here is a sample of one of the pages am trying to include a header and footer for ; PHP Code:
id like those file to have same theme as my forum ! Oh, i tried it using logician web templates hack , if i parse them using the template body as php , they show up alone , and if i parse them using his INCLUDE field ( he already stated the result there anyway) its parsed above the header . |
#2
|
||||
|
||||
Take a look at the vb tutorial section for how to create a vb powered webpage.
That will give you the tie in to use the vb header and footer to call a template. You can add most of your script in to the body part of that tutorial but I think you'll need to strip out the echos and call that via the variable in the template. Hope this helps. I am curious to see how this turns out. |
#3
|
||||
|
||||
I dug this up at sourceforge and installed it, it's pretty cool stuff. I don't have a real need to integtrate it into my board but like Reeve mentions, all the echos would have to be removed and the variables outputted to templates. Not a major task but still a pain, it wouldn't be too hard to integrate with a little time though.
|
#4
|
||||
|
||||
Quote:
* Set parsing as HTML or TEXT (not PHP). * Put your code into seperate .php file where view.php resides (eg. mycode.php) * Use this code in your webtemplate's phpinclude field: PHP Code:
|
#5
|
|||
|
|||
Hi guys,
thanks for your advices , regarding the first two replies , i tried to do that and since am not good at php i wasnt able to , and when i tried playing around , it returned variables messed up Or it returned blank files ! Another thing , the cache file is one listed above , for example the imdbsearch file gets posted data ( method post in search box ) and the imdbsearch uses _GET , Adding global.php somehow stops the rest from being parsed and i dont know why ! As for logician suggestion i will try now , but logically speaking cache.php code (above code) will work but as for imdbsearch .php am confused if it will work because example : imdbsearch.php?name=Rock ( is a sample of a posted request ) Logician templates will require | /forum/view.php?pg=test So if i parse the search within it , how should i post the data to url ? Is it possible logician ? If its not , is there a way to just include the header to other sections of my website located outside of it ! The problem is i have many free sections outside my forum and movies search is one of them , i wish to include headers so users ( might be tempted to register ) and widen my users database ! Just an update , Logician advice made the cache.php work fine , But as i expected that wouldnt just work for the search.php ! imdbSearch gets variables from a post like : <FORM ACTION="imdbsearch.php" METHOD=get> <p> <INPUT TYPE="text" NAME="name" SIZE=30 MAXLENGTH=50><BR> <INPUT TYPE="submit" VALUE="Submit"> Even if i included the imdbsearch in ob_start as above example and changed the form to post name=pg and value=movies (for example ) And the link will show as view.php?pg=movies&name=rock (for example ) but the variable is not passed to the included moviesearch and will not be excuted . Again my whole porpuse is to include the HEADER to a PHP file and making a VB page example using templates works when ur adding HTML page , anything including codes or php GET or POST will not be passed , unlike what i want . |
#6
|
||||
|
||||
define "$name" in the outside variables of your webtemplate so that webtemplate will not clear it.
|
#7
|
|||
|
|||
hello
how do u mean add it as an outside variable ? name is what it gets from http get variable ... oh why am speaking it , here is the code line <? require ("imdbsearch.class.php"); $search = new imdbsearch (); $search->setsearchname ($HTTP_GET_VARS["name"]); echo "<HTML><HEAD><TITLE>search</TITLE></HEAD><BODY>"; $results = $search->results (); foreach ($results as $res) { echo "<a href=imdb.php?mid="; echo $res->imdbid(); echo ">"; echo $res->title(); echo "(".$res->year().")"; echo "</a> "; echo " <a href=\"http://us.imdb.com/title/tt"; echo $res->imdbid(); echo "\">imdb page</a>"; echo "<br>\n"; } echo "</BODY></HTML>"; //echo $search->page; ?> if you want check the normal excuted code at http://www.tchatting.com/forum/imdbsearch.php?name=rock when we create a web template the code new link will look like http://www.tchatting.com/forum/view....arch&name=rock The idea would be great if the results are passed within the template itself ! |
#8
|
||||
|
||||
Screenshot will help
|
#9
|
|||
|
|||
sorry i havent replied this for a while, i had too much work , ill try your method again and let you know of my results , thanks again !
|
#10
|
|||
|
|||
I was actually thinking about something like this just the other day.
I would like to know how this turns out |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|