![]() |
|
|
Article Options |
|
#751
|
||||||||||||
|
||||||||||||
|
The page should look like this.
http://www.xvgaming.com/games/stats/bfstats.php And here is the (second page) using this article to create the template http://www.xvgaming.com/bfstatsbynam...M_0:0:21788544 Here is the php file (standalone) that makes it like bfstats.php
Here is a link to what it looks like when i do the stuff for the template. I think the issue is that when it loops to create the table rows. There is only one set of variables which get changed each loop. So I think i need to create seperate variables for each row(while it loops and register them all in the loop) Atleast thats what i think is wrong with it. Here is the link and the php/template files http://www.xvgaming.com/bfstats.php
So how would I be able to make the second bit of code using the templates to create the table rows like in the first standalone bfstats.php. Thanks abunch in advanced. No members have liked this post.
Last edited by SavSin : 16 Jan 2012 at 09:28. |
||||||||||||
|
#752
|
||||||||||||
|
||||||||||||
|
Why are you doing all these start and stop table rows? Why not just:
Then make sure to register $output and then in the template in place of:
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) No members have liked this post.
|
||||||||||||
|
#753
|
|||
|
|||
|
That worked perfectly. And to answer your question This was my first dabble in PHP and MySql. Im trying to teach it to my self and work on different things. So THANKS a ton.
I have a friend that wants to make a chrome widget that will alert him to new PM's and thread subscriptions on a VB forum so im learning some things about php and vb. No members have liked this post.
|
|
#754
|
||||
|
||||
|
thanks i like this
__________________
Follow Me On Twitter: @Benthams1 No members have liked this post.
|
|
#755
|
||||||||
|
||||||||
|
Help on my previous post. Still not solved.
I am still hoping for help. I have implemented dozens and dozens of pages using this process with lots of customization. Thanks Lyne. I have embedded newsfeeds, slideshows, spreadsheets, and etc. So I am fairly familiar with the method.
I am having trouble with one implementation. It looks beautiful, but it doesn't recognize me as logged in user. I call the test.php (using the demo model terminology from the original post in this article) from another page, let's call that index.php (really a complex application). If I require_once global.php on test.php, it doesn't work (printing variables shows me as a guest). I can require_once global.php on index.php and it works and shows me as logged in. I can pass the security token obtained from index.php to either test.php via an assign function in that application has very similar to the templater register used by VB for test.php. I have seen the security value on the test.php (printing variables) and have rendered the security value into the template html output. The result is that whenever I render an html page from this system (index.php calls test.php which uses template TEST to create an html page) it shows me as not logged in and the page source shows me as a guest. If I navigate to another forum page, I am still logged in. So here are some questions and hopefully I can get some help for further study: (1) If I can get a security token in the world of index.php such as
I have tried assigned it to the html template (TEST) as:
Note it has a slightly different format from an assign from test as it doesn't have vb:raw. But even though I see the value in the page source, it doesn't unlock the page and still shows me as a guest. One of two options, in my mind. I am either doing something wrong with passing the security token in terms of the input statement. Do I need to pass more than the security token? -or- index.php is disabling or clearing the session so the security token doesn't log me into the system. Interestingly, remember that if I navigate to another forum page I am still logged in and everything is fine. Does anyone have a suggestion on how to pass the security token. Does the syntax look OK. I have never unlocked a page in this manner. Or is there a command or series of command I can search through in the world of index.php that would disable (temporarily) the session so it can't recognize a user as logged in. I might be able to disable or adjust this function. Any advice or suggestions would be much appreciated. No members have liked this post.
|
||||||||
|
#756
|
||||
|
||||
|
Why are you focusing on passing the securitytoken? What about the userid - that is the variable you need.
__________________
Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools - Online vBulletin Manual If I post some CSS and don't say where it goes, put it in the additional.css template. I will NOT help via PM (you will be directed to post in the forums for help.) No members have liked this post.
|
|
#757
|
|||
|
|||
|
Trying to stay logged in passing .php to .php to template
Originally Posted by Lynne
Yes, I am sure I could pass userid to that page. My problem is that the Header and NavBar templates test to see if I am a member and since apparently I am not (security token is at guest), at this point, the header template prints out an empty login box and the navbar template puts a notice note on the page that says something like: "If this your first time on this site you may register ...".
My hack around this is to modify header to skip that assessment for this page (THIS_SCRIPT test) and not show anything in the upper right corner and to modify Navbar in the same manner to skip the messages for this page. So it's not elegant but it sort of works. The problem is that there are times that I get logged out after viewing this page (weird inconsistent behavior of tokens I think and browser caches). My thought is that if I could log myself back in after going through this other application, which apparently tries to flush the session or some sort of thing, I would be golden and this page would work like the dozens of others and I wouldn't have to worry about being logged out. So I thought if I used the security token I could log myself back in. This would be the cleanest approach forward. Any suggestions on how to do this, assuming you agree on the approach. I have seen some threads on remote login. Should I implement this on the test.php? Suggested thread for VB4 to help me do this? My security token notes were related to a post that Lynne made on this thread to use <input ...>. If I can't get this to work, my latest brainstorm is to experiment with merging index.php (the launch code for the other application) and test.php (the code for rendering VB pages via the tutorial Lynne pulled together). I don't like this approach since it will be difficult to maintain through updates of the other application, even assuming I can get it to work. The other application renders global variables into templates as well. I think it was already a miracle that I could get the other application to call test.php and have them both render things into the TEST template. Suggestions on approaches to stay logged in would be appreciated! --------------- Added 25 Jan 2012 at 22:47 --------------- Additionally, does anyone have any idea of what types of php commands in the other application might be logging me off the vbulletin system? I might be able to search for those and circumvent them. Thanks. No members have liked this post.
|
|
#758
|
|||
|
|||
|
I've recently built a new page and want to put in ad locations. There's something about the variable "$ad_location" that won't let me do it. "$bad_location" works though. Is there some special handling you have to do to use that variable name?
No members have liked this post.
|
|
#759
|
||||
|
||||
|
What do you mean by "won't let you do it"? Where are you trying to use that variable?
__________________
Please don't PM me - post your questions in the appropriate forum.
Please don't PM me to ask me to read your thread. No members have liked this post.
|
|
#760
|
|||
|
|||
|
Well, the problem I'm having is that I don't use ads on my own forum but I'm working on a new page for someone else who does. So I don't know much about how to place ads, and it's hard to design a page that uses them and get a new set of locations in the adminCP. Anyway I'm fumbling my way through this by trial and error.
"$ad_location" seems to be reserved by vBulletin so you can't just use it any way you want. But as I said, I'm figuring this out. I wish you could search for "ad location" but "ad" is too short!!!!!! If I ever get this working maybe I should write an article. No members have liked this post.
|
|
#761
|
|||
|
|||
|
Noob question.
I have created a terms.php file, but how to add words in that file. Well...I can add words but the formatting is not working such as <li> </li>. Is there something Im missing? No members have liked this post.
|
|
#762
|
|||
|
|||
|
Originally Posted by CrumbDown
If you are saying that the formatting does not look right in your editor while putting in code into terms.php, it shouldn't since the code is contained within a string variable that is passed to the template.
When I use this method to create external pages I will frequently develop the html within a separate file and test it prior to bringing to this template passing system. No members have liked this post.
|
|
#763
|
||||||||
|
||||||||
|
Format looks perfect in DreamWeaver.
This does not work in the template:
Nor:
No members have liked this post.
|
||||||||
|
#764
|
|||
|
|||
|
Are you saying the code you developed doesn't work in the custom template you built (TEST according to the tutorial) or in the page (test.php according to this tutorial).
No members have liked this post.
|
|
#765
|
|||
|
|||
|
Originally Posted by Rocket2009
What code? I have followed the above instructions to create a new template and a new .php file. All is ok. I got a new template: www.mywebsite.com/newpage.php. Perfect yes. But I need to add words/content on that page. By doing so I need to add it in the template which works perfect. But trying to get a paragraph or bullet points does not work. It's like viewing sentences in notepad without word wrap selected.
Regards No members have liked this post.
|
![]() |
«
Previous Article
|
Next Article
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
| Article Options | |
|
|
| New To Site? | Need Help? |
All times are GMT. The time now is 17:07.



