Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
Prev Previous Post   Next Post Next
  #1  
Old 06-06-2005, 05:35 AM
GSX-Racing GSX-Racing is offline
 
Join Date: May 2005
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Formatting carried over to non vb page?

Not sure if that is the wording but here goes.

I have a script that grabs the first post from the latest 3 threads and displays on a non vb page.

http://www.groundpilots.com/vb/print_news.phtml is what I'm talking about.

However, if you notice, it doesn't bring any of the formatting (like line breaks, colors, bold text, center) with it.

Does anyone know how I could achieve this? Also, it is only grabbing part of the post, how can I get it to grab all the text.

Here is most of the file is anyone can see where I need to change some of it.

Code:
require_once("./includes/functions_bbcodeparse.phtml");
$outxt=parse_bbcode2($ptext,"1","1","1","1","1");
$outxt=substr($outxt,0,350);

// This is optional. It strips out unecessary tags if you wish and leaves those specified behind
 $outxt = strip_tags($outxt, '<p>');
// This sql gets the title of the forum
$sql3 = "SELECT title FROM ".$dbprefix."forum WHERE forumid = \"$forumid\" LIMIT 1";
$sql_result3 = mysql_query($sql3, $connection) or die ("Could not execute query in second sql statement.");
$row3 = mysql_fetch_array($sql_result3);
$forumname = $row3["title"];
//EDIT the HTML OUTPUT HERE
$towrite .= '
<table class="newstext" width="100%" border="0" cellspacing="0" cellpadding="3">
  <tr> 
    <td bgcolor="#2F3E49"><a href="'.$forumspath.'/showthread.phtml?s=&amp;threadid='.$threadid.'"><font color=#FFFFFF>'.$title.'</font></a></td>
    <td align="right" bgcolor="#2F3E49"><font color=#CCCCCC>Posted by</font> <a href="'.$forumspath.'/member.phtml?s=&amp;action=getinfo&amp;userid='.$postuserid.'"><b><font color=#FFFFFF>'.$postusername.'</font></b></a><font color=#CCCCCC> on <i>'.$dateposted.'</i></font></td>
  </tr>
  <tr> 
    <td colspan="2" bgcolor="#232D35"><font color=#CCCCCC>'.$outxt.'</font></td>
  </tr>
  <tr bgcolor="#2F3E49"> 
    <td><a class=newsout href="'.$forumspath.'/showthread.phtml?s=&amp;threadid='.$threadid.'"><font color=#FFFFFF>'.$replycount.' '.$commenttext.'</font></a></td>
    <td align="right" bgcolor="#2F3E49"><a href="'.$forumspath.'/showthread.phtml?s=&amp;threadid='.$threadid.'"><font color=#FFFFFF>Read Complete Article</font></a>&nbsp;&nbsp;<a href="'.$forumspath.'/newreply.phtml?do=newreply&t='.$threadid.'"><img src="'.$forumspath.'/tren_z/buttons/reply.gif" title="Post a reply to this article" border="0"></a></td>
  </tr>
</table><br>
';
// END HTML EDIT
}
}

echo $towrite;

echo '</body></html>';
}

writenews("27", "","3");
?>
Reply With Quote
 

Thread Tools
Display Modes

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 03:26 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.03180 seconds
  • Memory Usage 2,285KB
  • Queries Executed 12 (?)
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_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)showthread_list
  • (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_threadedmode.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • 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_threaded
  • showthread_threaded_construct_link
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete