Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Outputting Threads Onto Non-vB Page Details »»
Outputting Threads Onto Non-vB Page
Version: , by ULTIMATESSJ ULTIMATESSJ is offline
Developer Last Online: Jul 2006 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 09-04-2003 Last Update: Never Installs: 0
 
No support by the author.

For my site i am trying to make a review system using the base of vBulletin, so i thought the easiest way would be to just add fields to the New Thread thing, now i got more fields added, but one thing i would like to be able to do would be to do would be to be able to output the threads onto a Non-vB PHP File, something like this

http://localhost/forums/showthread.php?s=&threadid=1168

would become

http://localhost/showreview.php?s=&threadid=1168
(preferably shorter, i'm not sure how far i can go with shortening the url, although once i get it sorted out i would like to output it into static html files)

What would i have to put into a PHP file to be able to call this stuff out?

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 09-08-2003, 10:56 PM
ULTIMATESSJ's Avatar
ULTIMATESSJ ULTIMATESSJ is offline
 
Join Date: Nov 2001
Location: Bristol, England
Posts: 315
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump
Reply With Quote
  #3  
Old 09-09-2003, 09:07 PM
ULTIMATESSJ's Avatar
ULTIMATESSJ ULTIMATESSJ is offline
 
Join Date: Nov 2001
Location: Bristol, England
Posts: 315
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

please don't ignore yet ANOTHER of my pleas for help......
Reply With Quote
  #4  
Old 09-09-2003, 09:30 PM
memobug memobug is offline
 
Join Date: Jun 2002
Posts: 418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1) I probably have no clue what you are doing, but could you copy showthread.php to shortreview.php and start making your own templates to format the information how you want?

2. If you want REALLY short urls, you can use HTACCESS to create a referer that will pipe

http://www.whatever.com/reviews/38123

into

http://localhost/forums/showreview.php?s=&threadid=1168

For example, in terms of htaccess redirects, the redirect I used at my site was to create an .htaccess file in a subfolder http://pictures.bonsaitalk.com/user containing the following:

RewriteEngine On
RewriteRule (.+) http://pictures.bonsaitalk.com/showg...=1&cat=500&si=$1 [R,L]

That sent traffic from http://pictures.bonsaitalk.com/user/WHATEVER

to http://pictures.bonsaitalk.com/showg...00*si=WHATEVER

3. They have a pretty nice reviews system for sale over at photopost. http://www.photopost.com. May have to navigate your way to their other products.

Regards,

Matt
Reply With Quote
  #5  
Old 09-11-2003, 05:33 AM
ULTIMATESSJ's Avatar
ULTIMATESSJ ULTIMATESSJ is offline
 
Join Date: Nov 2001
Location: Bristol, England
Posts: 315
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by memobug
1) I probably have no clue what you are doing, but could you copy showthread.php to shortreview.php and start making your own templates to format the information how you want?
Doing that will work but i would still have to edit more to get it to appear on the mainpage, and in the end it would just be easier to do it another way
Reply With Quote
  #6  
Old 10-07-2003, 10:09 PM
ULTIMATESSJ's Avatar
ULTIMATESSJ ULTIMATESSJ is offline
 
Join Date: Nov 2001
Location: Bristol, England
Posts: 315
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*cough* help *cough*
Reply With Quote
  #7  
Old 10-15-2003, 11:56 AM
ULTIMATESSJ's Avatar
ULTIMATESSJ ULTIMATESSJ is offline
 
Join Date: Nov 2001
Location: Bristol, England
Posts: 315
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ermmmmmm.....help?

/me hates the ignorant
Reply With Quote
  #8  
Old 10-16-2003, 06:53 PM
SpeedStreet SpeedStreet is offline
 
Join Date: Aug 2002
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ULTIMATESSJ
ermmmmmm.....help?

[high]* SpeedStreet hates the ignorant
[/high]
Just a guess, but if noone has responded it is because:

a) these boards have slowed down productivity since the release of vBulletin Beta. Expect activity to increase once vB3 hacks are allowed.

b) nobody has a decent solution for you...including me
Reply With Quote
  #9  
Old 10-16-2003, 07:01 PM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would do it myself, but try this:
https://vborg.vbsupport.ru/showthrea...threadid=12324
Reply With Quote
  #10  
Old 10-16-2003, 08:54 PM
Trigunflame's Avatar
Trigunflame Trigunflame is offline
 
Join Date: Aug 2002
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I worked on this for about 15 minutes, lots of stuff could be added/changed/improved/tweaked etc.. but this is a basic of how you would display posts within a topic.

ie. review.php?t=X (Where X = thread number)
Btw: I do recommend using / modifying the CSS tags even if you use your own header/footer.

PHP Code:
<?php

//+----------------------------
// Define Connection Variables
//+----------------------------

$site['name'] = "TF Topic View";    // Site Title

$db['host'] = "localhost";        // Server Host
$db['user'] = "root";            // Connect Username
$db['pass'] = "";            // Connect Password
$db['db'] = "forum";            // Database Name

$db['limit'] = 0;            // Show ONLY 1st Post | [0 = Off] [1 = On]

$layout['status'] = 1;            // Use Built In Template? [0 = Off] [1 = On]
$layout['bg'] = "#D2D2D2";        // Table BG Color
$layout['row1'] = "#EAEAEA";        // Row Alternate 1
$layout['row2'] = "#F2F2F2";        // Row Alternate 2

//+----------------------------
// Build MySQL Query Class
//+----------------------------

class mysql
{
    
//---------------------------
    // MySQL Initiation Function
    //---------------------------

    
function init ()
    {
        global 
$db;

        
mysql_connect($db['host'],$db['user'],$db['pass']);
        
mysql_select_db($db['db']);
    }

    
//---------------------------
    // Perform MySQL Query now..
    //---------------------------

    
function query ($sql)
    {
        static 
$i 0;
        if (!
$sql)
        {
            echo 
$i;
            return;
        }
        
$i++;

        return 
mysql_query ($sql);
    }

    
//---------------------------
    // MySQL Retrieval Functions
    //---------------------------

    
function fetch_result ($sql)
    {
        if (empty(
$sql))
        {
            die (
"No query supplemented : (Fetch Result)");
        }
        else
        {
            return 
mysql_result($sql,0);
        }
    }
    
    function 
fetch_array ($sql)
    {
        if (empty(
$sql))
        {
            die (
"No Query Supplemented : (Fetch Array)");
        }
        else
        {
            return 
mysql_fetch_array($sql);
        }
    }
}

//+------------------------------
// Initiate Everything MYSQL Now
//+------------------------------

$do = new mysql;
$do->init();

//+------------------------------
// Now Lets Begin Initialization
//+------------------------------

$thread $_GET['t'];            // Grab $_GET Variable


######################################################################
######################################################################
#include_once("./header.inc");
######################################################################
# If you want to use your own template uncomment the "Include_once"
# directive above, otherwise feel free for the script to use its
# own built in template.            -- Trigunflame
######################################################################
######################################################################

if ($layout['status'] == 1)
{

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><?php echo $site['name']; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.style1 
{
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-weight: bold;
    font-size: 14px;
}

.style2 
{
    font-family: Arial, Helvetica, sans-serif;
    font-size: 9px;
}

.style4 
{
    font-family: Verdana, Arial, Helvetica, sans-serif; 
    font-size: 10px; 
}

.style5 
{
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-style: italic;
    font-weight: bold;
    font-size: 14px;
}

.style8 
{
    font-family: Verdana, Arial, Helvetica, sans-serif; 
    font-size: 10px; 
    font-weight: bold; 
}

.style9 
{
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
}

.style10 
{
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 1px;
}
-->
</style>
</head>
<body>

<?php
}

if (
$db['limit'] == 1)
{
    
$limit "LIMIT 1";
}
else
{
    
$limit NULL;
}

$topic $do->fetch_array($do->query("    SELECT * FROM thread
                    WHERE threadid=\""
.$thread."\"
                    LIMIT 1"
));

$query $do->query("    SELECT * FROM post
            WHERE threadid=\""
.$thread."\"
            ORDER BY postid
            ASC 
$limit");
?>

<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#D2D2D2">
  <tr>
    <td colspan="3"><span class="style1"><?php echo $topic[title]; ?></span></td>
  </tr>

<?php

$i 
1;
while (
$show $do->fetch_array($query))
{

?>

  <tr>
    <td width="20%" align="center" bgcolor="#E0E0E0"><span class="style4"><?php echo date("m.d.y"$show[dateline]);; ?></span></td>
    <td width="40%" bgcolor="#E0E0E0" class="style8"><?php echo $show[title]; ?></td>
    <td width="40%" align="right" bgcolor="#E0E0E0" class="style8">Post: <?php echo $i?>&nbsp;</td>
  </tr>
  <tr>
    <td align="center" valign="top" bgcolor="#F0F0F0"><span class="style5"><?php echo $show[username].'</span><br /><span class="style4">User ID: '.$show[userid]; ?></span></td>
    <td colspan="2" bgcolor="#F0F0F0"><table width="100%"  border="0" cellspacing="1" cellpadding="4">
      <tr>
        <td valign="top"><span class="style9"><?php echo str_replace("\n","<br />",$show[pagetext]); ?></span></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td align="center" bgcolor="#F0F0F0"><span class="style4">&nbsp;</span></td>
    <td colspan="2" bgcolor="#F0F0F0">&nbsp;<span class="style8">Button1 Button2 Button3 Button4 Button5</span></td>
  </tr>
  <tr>
    <td width="20%" align="center" bgcolor="#D2D2D2" class="style10">&nbsp;</td>
    <td width="40%" bgcolor="#D2D2D2" class="style10">&nbsp;</td>
    <td width="40%" align="right" bgcolor="#D2D2D2" class="style10">&nbsp;</td>
  </tr>

<?php
    $i
++;
}

?>

  <tr>
    <td colspan="3"><span class="style2"><a href="#">Return to Top</a></span></td>
  </tr>
</table>

<?php

######################################################################
######################################################################
#include_once("./footer.inc");
######################################################################
# If you want to use your own template uncomment the "Include_once"
# directive above, otherwise feel free for the script to use its
# own built in template.            -- Trigunflame
######################################################################
######################################################################

if ($layout['status'] == 1)
{    

?>

</body>
</html>

<?php
}
?>
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 11:09 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
  • Page Generation 0.04541 seconds
  • Memory Usage 2,358KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete