Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
  #751  
Old 16 Jan 2012, 07:50
SavSin SavSin is offline
 
Join Date: Jan 2012
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


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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.

Last edited by SavSin; 16 Jan 2012 at 10:28.
Reply With Quote
  #752  
Old 16 Jan 2012, 22:51
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Why are you doing all these start and stop table rows? Why not just:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Then make sure to register $output and then in the template in place of:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Former vBulletin.org Staff Member

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.)
Reply With Quote
  #753  
Old 17 Jan 2012, 01:35
SavSin SavSin is offline
 
Join Date: Jan 2012
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.
Reply With Quote
  #754  
Old 22 Jan 2012, 18:59
ClErK1991's Avatar
ClErK1991 ClErK1991 is offline
 
Join Date: May 2009
Real name: Geovanni Clerk
thanks i like this
Reply With Quote
  #755  
Old 24 Jan 2012, 03:15
Rocket2009 Rocket2009 is offline
 
Join Date: Mar 2009
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


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I have tried assigned it to the html template (TEST) as:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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.
Reply With Quote
  #756  
Old 24 Jan 2012, 17:33
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Why are you focusing on passing the securitytoken? What about the userid - that is the variable you need.
__________________
Former vBulletin.org Staff Member

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.)
Reply With Quote
  #757  
Old 25 Jan 2012, 02:00
Rocket2009 Rocket2009 is offline
 
Join Date: Mar 2009
Trying to stay logged in passing .php to .php to template

Originally Posted by Lynne View Post
Why are you focusing on passing the securitytoken? What about the userid - that is the variable you need.
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 23: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.
Reply With Quote
  #758  
Old 27 Jan 2012, 22:02
nerbert nerbert is offline
 
Join Date: May 2008
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?
Reply With Quote
  #759  
Old 28 Jan 2012, 01:45
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Originally Posted by nerbert View Post
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?
What do you mean by "won't let you do it"? Where are you trying to use that variable?
Reply With Quote
  #760  
Old 28 Jan 2012, 02:14
nerbert nerbert is offline
 
Join Date: May 2008
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.
Reply With Quote
  #761  
Old 10 Feb 2012, 09:36
CrumbDown CrumbDown is offline
 
Join Date: Feb 2012
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?
Reply With Quote
  #762  
Old 10 Feb 2012, 14:27
Rocket2009 Rocket2009 is offline
 
Join Date: Mar 2009
Originally Posted by CrumbDown View Post
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?
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.
Reply With Quote
  #763  
Old 10 Feb 2012, 16:05
CrumbDown CrumbDown is offline
 
Join Date: Feb 2012
Format looks perfect in DreamWeaver.

This does not work in the template:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Nor:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #764  
Old 10 Feb 2012, 20:47
Rocket2009 Rocket2009 is offline
 
Join Date: Mar 2009
Originally Posted by CrumbDown View Post
This does not work in the template:
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).
Reply With Quote
  #765  
Old 11 Feb 2012, 11:49
CrumbDown CrumbDown is offline
 
Join Date: Feb 2012
Originally Posted by Rocket2009 View Post
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).
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
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 02:55.

Layout Options | Width: Wide Color: