Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)

Reply
 
Thread Tools Display Modes
  #11  
Old 10-08-2001, 11:20 PM
Vociferous Vociferous is offline
 
Join Date: Dec 2002
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm.... I'm running 2.0.3 on the test board.

well, I did some testing and I got this to work I made some assumptions though.

I assumed (as soceris pointed out as a problem) that the following supposedly in the forumdisplay template
PHP Code:
<td bgcolor="$fbackcolor"><normalfont>$numnew</normalfont></td
was actually supposed to go into the forumdisplaybit template

however, if it goes into forumdisplaybit template then it should be as follows:

Step 1) In forumdisplaybit find:
Code:
<td bgcolor="#DFDFDF"><normalfont>$thread[views]</normalfont></td>
Step 2) Replace that with:
Code:
<td bgcolor="#F1F1F1"><normalfont>$thread[views]</normalfont></td>
Step 3) Insert the following above it:
Code:
<td bgcolor="#DFDFDF"><normalfont>$numnew</normalfont></td>
No errors for me though! Not sure why you are getting them Amy.

tubedogg, would you mind telling me/us whether I was correct in assuming the final step is supposed to be in the forumdisplaybit template?

Dave
Reply With Quote
  #12  
Old 10-08-2001, 11:27 PM
Vociferous Vociferous is offline
 
Join Date: Dec 2002
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

okay, this board keeps turning my variables into hex color code!

Trying this again.

edit:

that didn't work...
Reply With Quote
  #13  
Old 10-08-2001, 11:32 PM
Vociferous Vociferous is offline
 
Join Date: Dec 2002
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

fine, the step by step instructions (with the correct code) are in the attached txt file and I think if nothing else. tubedogg changed the variables just to get it to post here on these forums. lol

edit:

Even text files are against me!

okay, last shot at this.


Step 1) In forumdisplaybit find:
<td bgcolor="(secondaltcolor)"><normalfont>$thread[views]</normalfont></td>


Step 2) Replace that with:
<td bgcolor="(firstaltcolor)"><normalfont>$thread[views]</normalfont></td>


Step 3) Insert the following above it:
<td bgcolor="(secondaltcolor)"><normalfont>$numnew</normalfont></td>

just change the ( and ) to { and }

this better work-- I'm stubborn, but not that stubborn.
Attached Files
File Type: txt forumdisplaybit_changes.txt (346 Bytes, 7 views)
Reply With Quote
  #14  
Old 10-09-2001, 12:15 AM
Vociferous Vociferous is offline
 
Join Date: Dec 2002
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, I made some changes to the code and here are the modified instructions:

In forumdisplay.php find
PHP Code:
$threadids='thread.threadid IN (0'.$stickyids
Replace it with
PHP Code:
$threadids='threadid IN (0'.$stickyids
Find
PHP Code:
// check to see if there are any threads to display. If there are, do so, otherwise, show message 
Right below it add
PHP Code:
$posts $DB_site->query("SELECT COUNT(*) AS posts,threadid FROM post WHERE $threadids AND dateline>$bbuserinfo[lastvisit] GROUP BY threadid");
while (
$post $DB_site->fetch_array($posts)) {
$newpost[$post[threadid]] = $post[posts];

Find
PHP Code:
if (($bbuserinfo[maxposts] != -1) and ($bbuserinfo[maxposts] != 0)) 
Right above it add
PHP Code:
if ($newpost[$thread[threadid]]) {
$newposts $newpost[$thread[threadid]];
eval(
"\$numnew = \"".gettemplate('forumdisplaybit_newposts')."\";");
} else {
$newposts "0";
eval(
"\$numnew = \"".gettemplate('forumdisplaybit_newposts')."\";");

And then you need to add a template named forumdisplaybit_newposts with the following contents:
Code:
$newposts
And then edit the forumdisplay_threadslist template
Code:
<td bgcolor="{tableheadbgcolor}" nowrap><smallfont><a href="$sorturl&sortorder=desc&sortfield=replycount"><font color="{tableheadtextcolor}"><b>Replies</b></font></a> $sortarrow[replycount]</smallfont></td>
Right below it add
Code:
<td bgcolor="{tableheadbgcolor}" nowrap><smallfont><font color="{tableheadtextcolor}"><b>New Posts</b></font></smallfont></td>
Then find
Code:
<td bgcolor="{tableheadbgcolor}" width="100%" colspan="8" align="center"><smallfont color="{tableheadtextcolor}">
Important! Change the "8" to "9".


Then in the forumdisplaybit template do the following:

Step 1) In forumdisplaybit find:
<td bgcolor="(secondaltcolor)"><normalfont>$thread[views]</normalfont></td>


Step 2) Replace that with:
<td bgcolor="(firstaltcolor)"><normalfont>$thread[views]</normalfont></td>


Step 3) Insert the following above it:
<td bgcolor="(secondaltcolor)"><normalfont>$numnew</normalfont></td>

just change the ( and ) to { and }


And that's it!

*************************

After going through and changing the instructions I saw that it was indeed forumdisplaybit.

anyway, tubedogg-- you rock! thanks man!

Dave
Reply With Quote
  #15  
Old 10-09-2001, 12:18 AM
Vociferous Vociferous is offline
 
Join Date: Dec 2002
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

doh! Hex code again! Well, you guys understand right?

one last thing tubedogg...

how do you get it to not change the code to hex?
Reply With Quote
  #16  
Old 10-09-2001, 12:33 AM
tubedogg's Avatar
tubedogg tubedogg is offline
 
Join Date: Oct 2001
Location: Medina, OH
Posts: 785
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My secret LOL

All I did was break it up with tags (kinda hard to explain, just look at the example below):
{secondaltcolor} <-- normally this would change, but when I add the following:
{second[b][/b]altcolor}
And then it appears correctly. Note I added some stuff for it to appear correctly for you, but the point is to use what I have actually put there and not what I used to make it. Confused yet? LOL

In the next version (2.0.4) you will be able to make these not change into hex by selecting the "disable smilies in this post" option.

Anyway you were right about the forumdisplay -> forumdisplaybit thing and I edited my post to reflect that.
Reply With Quote
  #17  
Old 10-09-2001, 12:58 AM
Vociferous Vociferous is offline
 
Join Date: Dec 2002
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ohhhhh

I'll remeber that for next time! Thanks
Reply With Quote
Reply

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 10:43 AM.


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.06693 seconds
  • Memory Usage 2,267KB
  • Queries Executed 14 (?)
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
  • (7)bbcode_code
  • (7)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (1)postbit_attachment
  • (7)postbit_onlinestatus
  • (7)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_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
  • 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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete