Quote:
Originally Posted by bulbasnore
[*]Can I just plunk my php database query and HTML generation code in the include section of webtemplate?[*]If so, how do I pick up the post info on an incoming form submission, and get it to that code I plunked in?[*]My php code talks to an external database. Is it just webqueries that are limited to the vB database, or does webtemplate/vb block even non-vb/template queires from included php code?[*]Am I better off to just try to make my own cookie from vB login and keep my pages external to vB/CMPS/webtemplate?
|
What you are trying to achieve is really sophisticated and I can not say if you can do it with webtemplates or not without trying it. However I'd urge you to try. Nothing to lose and it may work.
On theory it sounds like "doable". However my concern is that there can occur many unexpected drawbacks when you integrated your code. Some can be even unrelated to webtemplates: Eg. your variables can clash with vbulletin variables etc. So no way to say whether it will work or not without trying it.
As for your questions:
1- yes, sounds ok. If you put it into vb phpinclude template and it worked (except getting GET/POST VARIABLES successfully), it will work in phpinclude template of webtemplate.
2- You can use a webquery for this and use the phpinclude field of the webquery for the postid variable your code passes. It will return you the post info. However it will return it to the webtemplate, not your code (which is inside phpinclude of webtemplate!) so I don't know if it is ok with you.
3-webqueries can only query vb database. But if you use your own DB connection commands in your phpinclude field of webtemplates, they are not blocked so your commands can query other dbs. (again: provided that this strategy worked in the default phpinclude field of vb! If it does not work in vb's phpinclude field, it will not work in webtemplates's phpinclude field)
4- If it does not work, I still don't suggest you to use a seperate autentication for your application. I think your path should be copying vb global.php into another file, remove GET/POST variable blocking of it in your new file and include it in your application to simulate vb authentication. This sounds more logical. You can check webtemplates source code to see how it manages to accept variables vb global.php blocks.