The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Problem pulling and displaying info from the database while building plugin
I have a system that pulls RSS feeds (new headlines) from multiple sources and stores them in the same database as vbulletin. I then have custom plugins that take those feed items and displays them on the site (can see at http://www.arizonanewstalk.com/city.php). I then want to display a link next to RSS item to start a new thread and autopopulate the subject line with the headline title.
I duplicated the newthread.php and newthread template and modified the newthread.php to show the newthread template. I am passing a the id of the RSS item from the page that displays the rss headlines to the new newthread.php file via get. I am using a plugin at the global_start hook (will move to newthread_start later) to get the item ID and pull the title to display in the title field of the new thread. I am using this code: Code:
$headlineid = $_GET['headlineid']; $titlequery = $db->query_first("SELECT ItemTitle FROM feedItems WHERE itemID = 1234 LIMIT 1"); while ($hdln = $db->fetch_array($titlequery)) { $msgtitle = $hdln['ItemTitle']; } Code:
<input type="text" class="bginput" name="subject" value="$msgtitle" size="40" maxlength="$vboptions[titlemaxchars]" tabindex="1" /> I am at a loss here because if I hard code $msgtitle = "this works" then it will autopopulate the field with "this works". Anyone have any ideas? please help! If you go to http://www.arizonanewstalk.com/city.php and click any "talk about this" link you can see what I'm trying to do (look at the URL variable for the item id too) Thanks |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|