PDA


View Full Version : Show post in module?


asskickah
08-11-2005, 05:44 AM
so i need to just show the post contents in a custom module on the front page....itll be from a dedicated forum...

basically what i wanna do is show the teams logo which my home team is playin next...it cant be weekly...like the nfl...soemthing like the nba one would work

just need to pull info from a specified thread/forum...

plz help!

Brian
08-11-2005, 01:54 PM
So why not just use the News module for this?

asskickah
08-11-2005, 02:43 PM
i only want the post contents to appear...not the title or author etc


plz help sir!

asskickah
08-12-2005, 05:30 AM
anyone?!?!?

asskickah
08-12-2005, 06:31 AM
basically what i need is a nextgame.php file that will only pull the postbit from a specific thread

the templates, i can do

all i need is the query

asskickah
08-12-2005, 06:38 AM
what i need is basically soemthing like this: http://www.mstatefans.com/

m-tuning
08-12-2005, 11:51 AM
I need it too

asskickah
08-12-2005, 04:32 PM
anyone?

Brian
08-12-2005, 04:32 PM
what i need is basically soemthing like this: http://www.mstatefans.com/
That's the default news module from vBa CMPS 2.0.

asskickah
08-12-2005, 04:42 PM
u mean the side that shows their home teams next game?

Brian
08-12-2005, 05:20 PM
Ahh, I thought you were talking about the news section. That looks more like a custom PHP module they've created.

asskickah
08-12-2005, 06:28 PM
i know how to create the templates and stuff...just need some php help to grab the post bits...in my case itll be just the next team they play's logo and the date and time of the next game...all this will be posted as a post somewhere and i need some php to pull this out...dont need to pull out the title/author etc...just the post!

plz help me brian!

Brian
08-12-2005, 06:36 PM
If you're not using the news module then you could just edit the 'adv_portal_newsbits' template and make the changes in there.

asskickah
08-12-2005, 07:15 PM
hmmm....let me try this...ill get back to u soon brian...thanks bud


edit: wait..i AM also using the news module...will the above still work (what u said)

asskickah
08-12-2005, 08:24 PM
ok so i made a custom db with the info i need in it...if i run this script...it pulls the info out that i need

<?php
// Make a MySQL Connection
mysql_connect("localhost", "nextgame", "pass") or die(mysql_error());
mysql_select_db("nextgame") or die(mysql_error());

// Retrieve all the data from the "nextgame" table
$result = mysql_query("SELECT * FROM nextgame")
or die(mysql_error());

// store the record of the "nextgame" table into $row
$row = mysql_fetch_array( $result );

// Print out the contents of the entry
echo $row['nextgame'];
?>

now...how do i call this script in my template file so it fetches the results and displays it?

asskickah
08-12-2005, 08:41 PM
i got it to display on the main page...but at the top...how do i make it display in my custom module...on the right side...i have the block showing...but need this sql result in that box...

help!

asskickah
08-13-2005, 05:42 AM
nvm, figured it out my own way