Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Design and Graphics Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-16-2009, 09:25 PM
Hell Bomb Hell Bomb is offline
 
Join Date: Jun 2009
Posts: 385
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How Can I

My only real question is how can i make this change so it stays with the style of each template that is being used instead of me having to draw the individual files?

Code:
<?php
// this is for the master section, 86 = starcraft
// http://www.choasgaming.com/forums/forumdisplay.php?f=86
$id93 = 86;
echo '
<table width="100%" border="0" cellpadding="0" cellspacing="0" background="http://www.choasgaming.com/forums/grunged/misc/cat_title_bg.gif">
    <tr>
<td width="22" background="http://www.choasgaming.com/forums/grunged/misc/cat_title_bg.gif"><img src="http://www.choasgaming.com/forums/grunged/misc/cat_title_left.gif" width="22" height="31"></td>
<td background="http://www.choasgaming.com/forums/grunged/misc/cat_title_left_bg.gif" style="background-repeat:no-repeat;">
    <font class="container">Starcraft Section</font></td>
    <td background="http://www.choasgaming.com/forums/grunged/misc/cat_title_bg.gif">
<div align="right"><a style="float:right" href="#top" onclick="return toggle_collapse("forumbit_84")"><img id="collapseimg_forumbit_84" src="http://www.choasgaming.com/forums/grunged/buttons/collapse_tcat.gif" alt="" border="0" /></a>
    </div></td>
<td width="21" background="http://www.choasgaming.com/forums/grunged/misc/cat_title_bg.gif"><div align="right"><img src="http://www.choasgaming.com/forums/grunged/misc/cat_title_right.gif" width="21" height="31"></div></td>
    </tr>
    </table>
    <table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
    <tbody id="collapseobj_forumbit_84" style="">
    <tr align="center">
    <td class="thead" width="50">&nbsp;</td>
    <td class="thead" align="left">Forum</td>
    <td class="thead" width="200">Last Post</td>
    <td class="thead" width="40">Threads</td>
    <td class="thead" width="40">Posts</td>
    <td class="thead">Moderator</td>
    </tr>
    <tr align="center"><tr align="center">
    <td class="alt1Active" align="left" id="f86">
    <div>
    <a href="forumdisplay.php?f=86"><strong>Starcraft</strong></a>
    </div>
<div class="smallfont" style="margin-top:6px"><strong>Sub-Forums</strong>: <table border="0" cellpadding="0" cellspacing="0" width="100%" align="center" >
    <tr valign="top">
';
$counter = -1;
$array = array();
$querya = "SELECT * FROM forum WHERE parentid = " . $id93;
$resulta = mysql_query($querya) or die(mysql_error());

while($rowa = mysql_fetch_array($resulta)){
    $counter = $counter + 1;
    $array[$counter] = $rowa[lastpost];

    echo '
 <tr><td style="text-transform:none;font-size:13px;white-space:nowrap;" width="100%"> <img class="inlineimg" src="http://www.choasgaming.com/forums/grunged/statusicon/subforum_old.gif" alt="" border="0" id="forum_statusicon_' . $rowa["forumid"] . '" /> <a href="forumdisplay.php?f=' . $rowa["forumid"] . '">' . $rowa["forumid"] . '</a></td></tr>
    ';
}
echo '
    <td>&nbsp;</td>
    </table></div>
    </td>
    <td class="alt2" nowrap="nowrap" width="175">
    <div class="smallfont" align="">
    <div>
    <span style="white-space:nowrap">
    <img class="inlineimg" src="http://www.choasgaming.com/forums/images/icons/icon1.gif" alt="" border="0" />
';
$id2 = max ($array);
$queryb = 'SELECT * FROM forum WHERE lastpost = '. $id2;
$resultb = mysql_query($queryb) or die(mysql_error());
while($rowb = mysql_fetch_array($resultb)){
    $short1 = strlen($rowb["lastthread"]);
    if ($short1 > 25){
        $short1 = substr($rowb["lastthread"], 0, 25);
        $short = $short1 . "...";
    }else {
        $short = $rowb[lastthread];
    }

    echo '
 <a href="showthread.php?goto=newpost&amp;t=' . $rowb["lastthreadid"] . '" style=white-space:nowrap title="Go to first unread post in thread '.$rowb[lastthread].'">
        <strong>' . $short . '</strong></a>
        </span>
        </div>
<div style="white-space:nowrap; float:"> by <a href="member.php?find=lastposter&amp;f=' . $rowb[forumid] . '" rel="nofollow">' . $rowb[lastposter] . '</a>
        </div>
        <div align="" style="white-space:nowrap">
        2 Days Ago
<a href="showthread.php?p=' . $rowb[lastthreadid] . '#post' . $rowb[lastthreadid] . '"><img class="inlineimg" src="http://www.choasgaming.com/forums/grunged/buttons/lastpost.gif" alt="Go to last post" border="0" /></a>
        </div>
        </div>
        </td>
        <td class="alt1" width="65">25</td>
        <td class="alt2" width="65">69</td>
        <td class="alt1" width="120"><div class="smallfont">&nbsp;</div></td>    
        </tr>
        </tbody>
        </table>
    ';
}
?>
Reply With Quote
  #2  
Old 08-17-2009, 04:10 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't understand what it is you want or what that code is for.
Reply With Quote
  #3  
Old 08-17-2009, 07:51 AM
Hell Bomb Hell Bomb is offline
 
Join Date: Jun 2009
Posts: 385
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry my fault, that code displays a forum on another page, i have been making my own custom pages on my website and that will display a forum by drawing the forum id. I was able to make it draw all the information correctly but i want it to draw the template information to match the theme being used. I don't know how to make it draw the picture info so it will images used by different themes.
Reply With Quote
  #4  
Old 08-17-2009, 03:06 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You may want to take a look at this article - [How-To] vBulletin API Basics: Creating Custom Pages & Misc.
Reply With Quote
  #5  
Old 08-18-2009, 04:43 AM
metalguy639 metalguy639 is offline
 
Join Date: Dec 2008
Posts: 501
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hellbomb View Post
Sorry my fault, that code displays a forum on another page, i have been making my own custom pages on my website and that will display a forum by drawing the forum id. I was able to make it draw all the information correctly but i want it to draw the template information to match the theme being used. I don't know how to make it draw the picture info so it will images used by different themes.
Do you have a css file for your other files in your site? If not you may want to make one and then link it into your other site pages in the head part of your html before the </head> tag. A link would look like this:

Code:
<link href="yourcssfile.css" rel="stylesheet" type="text/css" />
Then in your CSS file place the vb css info for the colors and what have you. You can get the css info the easier way is to view your page source when looking at your forums with the skin you want to duplicate engaged. You should see all the css code it will look something like this in the source view:

Code:
<!--
.vBulletin_editor
{
	border: 2px groove #fff;
}
-->
That was the actual source css from this exact posting page on vb.org. There is more to the code but it maybe against the rules to show the code completely. You get the basic idea as to what it looks like though.

Not sure if this would work, but it is something that you can try. If you images do not show up try putting the full URL in the path of the css style sheet. Like you may see something like this:

Code:
body {
background-image:url (images/background.jpg);
}
You would want to change the images/background.jpg to http://www.yoursiteurl.com/images/background.jpg. Make sure you have the correct pathway on where your image is located on your server.

Hope this helps and works for you.
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 01:44 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.05117 seconds
  • Memory Usage 2,209KB
  • Queries Executed 11 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete