![]() |
php code On The Forums???
I tried adding a php code to my forums and it didn't work, its just a blank space.... any ideas ? :o
|
Don't use dreamweaver.
|
I didnt use dreamweaver, I run a wrestling web site and have a news posting system (cutenews) and theres a code you put on your webpage which puts the news you add on to the page... Well I put it in one of the sidebars for the left_sidebar hack, but when I went to my forum home it wasn't showing, there was nothing...
<?PHP $PHP_SELF = 'msm.php'; $category = "2"; $number = "27"; $template = "Headlines"; include("cutenews/show_news.php"); ?> Thats the code I'm trying to add... any thoughts? |
Quote:
What you can do is insert the php code in the phpinclude_start template, and map the output to a variable. Then, use this variable to display whatever your code output. |
I don't mean to come off as a total idiot but... how do I add a variable? Like is there a certain code I have to apply... I know a variable is something like $headlines But I just dont know how to set one up... :surprised: Same thing with setting up an output... I've been working with vB for about 5 months but I've never had to do anything of this sort.
|
Quote:
PHP Code:
However, setting up a variable is easier than you might think. Basically it is assigning something to something. By this I mean, you can set a number to a variable, and use that variable to print off the number. For example: PHP Code:
|
show_news:
Code:
<?PHP >> article 1 blahblahblah >> article 2 somethingsomethingsomething >> article 3 --asd-as-d-asd-a-sd-a-sd-sad And when you click on the link, the msm.php is just the template for the page it'll be taken too which contains the full article. In the php code I'm trying to put up will just put the links (like I poorly exampled above :D) so members can click the link and be taken to the news article that is part of the main site... Its very hard to explain, hopefully I was clear enough. :-) |
I see, I see.. so you want this on your main website, or on your forums?
|
Forums -- Its already on my main site. :)
Nope man... Didnt Work :-( Anyone Else have some suggestions? |
All times are GMT. The time now is 03:19 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|