vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Add-On Releases - CES Site News (https://vborg.vbsupport.ru/showthread.php?t=137365)

thincom2000 02-25-2007 06:40 PM

You could rename my file to newsces.php if you wish, but you would need to edit news.php and shownews.php, search for all occurrences of news.php and replace with newsces.php

Then in all the templates for this hack, do the same.
Also check the plugins.

Chadi 02-25-2007 11:53 PM

Thank you for your help. Now, after I left and came back I got one of the common mysql error messages emailed to me, although I cannot duplicate it. I am able to enter the forum, able to create new thread. I did however get a 'page not found' when I clicked on comments link on any of the posts I've made.

Code:

Database error in vBulletin x:

Invalid SQL:

                SELECT COUNT(*) AS threads, SUM(IF(thread.lastpost > 1172448717 AND open <> 10, 1, 0)) AS newthread
               
                FROM thread AS thread
               
                WHERE forumid = 72
                        AND visible = 1
                       
                       
                        1172445117;

MySQL Error  : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1172445117' at line 9 Error Number : 1064
Date        : Sunday, February 25th 2007 @ 06:11:58 PM
Script      : http://www.talkjesus.com/newsces.php?f=72
Referrer    :
IP Address  : xx.xxx.65.147
Username    : Unregistered
Classname    : vb_database


Also, is this actually like a 'blog' in a way, news blog so to speak? I'm just curious if that's the intention of the hack. I'm just testing it out in the meantime.

thincom2000 02-26-2007 12:04 AM

You need to rename shownews.php to shownewsces.php apparently.

And yes, that was the intention of the hack, except I wanted anyone with permission to be able to post an entry in the same blog, and I wanted them to count as posts.

EDIT: To make that Database error stop:

In newsces.php, find:
PHP Code:

    $threadscount $db->query_first_slave("
        SELECT COUNT(*) AS threads, SUM(IF(thread.lastpost > 
$lastread AND open <> 10, 1, 0)) AS newthread
        
$hook_query_fields
        FROM " 
TABLE_PREFIX "thread AS thread
        
$tachyjoin
        
$hook_query_joins
        WHERE forumid = 
$foruminfo[forumid]
            AND sticky = 0
            
$visiblethreads
            
$globalignore
            
$limitothers
            
$datecut
            
$hook_query_where
    "
); 

Replace with:
PHP Code:

    $threadscount $db->query_first_slave("
        SELECT COUNT(*) AS threads, SUM(IF(thread.lastpost > 
$lastread AND open <> 10, 1, 0)) AS newthread
        
$hook_query_fields
        FROM " 
TABLE_PREFIX "thread AS thread
        
$tachyjoin
        
$hook_query_joins
        WHERE forumid = 
$foruminfo[forumid]
            AND sticky = 0
            
$visiblethreads
            
$globalignore
            
$limitothers
            
$hook_query_where
    "
); 


EDIT: These fixes, among others for bugs that I JUST discovered today, will be included in the next release 1.1.0.

Chadi 03-06-2007 12:23 PM

Still getting these errors:

Code:

Database error in vBulletin 3.6.x:
 
  Invalid SQL:
 
              SELECT COUNT(*) AS threads, SUM(IF(thread.lastpost > 1173188048 AND open <> 10, 1, 0)) AS newthread
             
              FROM thread AS thread
             
              WHERE forumid = 72
                    AND visible = 1
                   
                   
                    1173184448;
 
  MySQL Error  : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1173184448' at line 9 Error Number : 1064
  Date        : Tuesday, March 6th 2007 @ 07:34:08 AM
  Script      : http://www.talkjesus.com/newsces.php?f=72
  Referrer    :
  IP Address  : xxx.6.87.36
  Username    : Unregistered
  Classname    : vb_database


thincom2000 03-06-2007 01:42 PM

Did you remove $datecut from that query?

dizzy100 03-06-2007 01:48 PM

I tried this hack out too. I get exactly the same issues as others are reporting i,e, trying to find news.php in my webserver root when my vbulletin forum is in forums/ and yes the white text over the username as well. Rather weird.

Apart from these teething issues it seems a great hack. I wonder if we could have an option to only show the first X amount of words or letters (as a spoiler) with a link to the full article. Long news takes up an enormous amount of space using this hack :)

Still testing but pretty pleased with what i have seen (if i can get both the new option, if possible, and the two bugs squashed).

Chadi 03-06-2007 04:07 PM

Quote:

Originally Posted by thincom2000 (Post 1197125)
Did you remove $datecut from that query?

I did not modify anything, just installed the hack only. How would I resolve this?

thincom2000 03-07-2007 01:22 AM

Please see post #63. That should solve the issue.

Chadi 03-10-2007 10:46 PM

Can someone please explain how to get the COMMENTS box (bottom) to be even width with the above news listing? It is too wide.

Also, how do I remove that extra purple space between the comments box and the new reply button?

My news_comments template is untouched:

Code:

<if condition="$counter == 0">
<table class="tborder" id="post$post[postid]" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
</if>
<tr>
    <td class="tcat" align="$stylevar[left]"<if condition="$vboptions['legacypostbit']"> colspan="2"</if>>
        $vbphrase[news_comments]
    </td>
</tr>
<if condition="$counter == 0">
<tr>
<td class="alt1" align="$stylevar[left]"<if condition="$vboptions['legacypostbit']"> colspan="2"</if> valign="top">
$vbphrase[no_comments_in_this_article]
</td>
</tr>
</table>
</if>


thincom2000 03-11-2007 01:15 AM

You should check your settings for the style you are using. My guess is it has to do with variances in your settings for form/etc. widths.


All times are GMT. The time now is 01:56 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.01243 seconds
  • Memory Usage 1,760KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete