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)

Chadi 03-20-2007 02:30 AM

It must be a part of the hack somewhere because it was not there before and the blue is only behind the comments field, which indicates some code in the template pulling that up.

Which template would I edit for this area?

thincom2000 03-20-2007 02:55 AM

You have to edit the CSS. Go to Style Manager -> All Style Options. Scroll down to page background, and make sure that matches the rest of your site. I try to keep a lot of my backgrounds transparent, so that there's never a conflict with something underneath. If you have the time, I would recommend going through the CSS and doing this where you can. It will keep your style simpler and much easier to manage.

Chadi 03-20-2007 03:02 AM

Please see attached. Its not my css at all.

The color (blue) in comments background area is:

#B7BCE2

The only time this is mentioned in the Main CSS is body background color

I'm 100% sure its something obviously in the mod's template somewhere

If you tell me which template it is, I will copy/paste it even though I reverted all

thincom2000 03-20-2007 04:45 AM

In template SHOWNEWS, find and remove:
HTML Code:

<!-- end content table -->
$spacer_close
<!-- / end content table -->

Find and remove:
HTML Code:

<!-- start content table -->
$spacer_open
<!-- / start content table -->

In templates shownews_similararticles and news_comments, find and remove:
HTML Code:

$spacer_open
Find and remove:
HTML Code:

$spacer_close
Some of those had been added to make all the tables the same size on your forum. Hopefully removing the ones that were there already will bypass the earlier problem.

thincom2000 03-24-2007 12:13 AM

New version released. Added the BB-Codes you wanted. Also got rid of the unnecessary $spacer_open/$spacer_close (mentioned in last post). Enjoy it.

dizzy100 03-24-2007 03:52 AM

Upgraded to the latest version but now get

Fatal error: Call to a member function parse() on a non-object in C:\xampplite\htdocs\news.php on line 893

When entering any forum that is news enabled.

I also found a bug in the old release (not sure if its addressed in this one) where f you soft delete an article it remains visiable on the front page of the news with the read more tag. However clicking the readmore tag brings up the "this thread in invalid" error box.

UPdate: De-installed the product and re-installed, resetting my settings. The news functioned as it should then until i added a Limit News Preview to How Many Words? option and then the same error as above came up.

thincom2000 03-24-2007 04:14 AM

Okay, I tried to fix the soft-delete bug you found. Not sure if it worked, since I only ever hard-delete, so let me know. The fatal error should also be gone. It was a result of copy & paste from a plugin to hard-coding it, and some class references had changed in the process.

dizzy100 03-24-2007 07:54 AM

Thanks that got it for the php error.

However soft delete still persists to display after the fix.

thincom2000 03-24-2007 04:18 PM

I am not getting an "invalid thread id" error after soft-delete. I can still access the thread normally.

thincom2000 03-25-2007 04:13 AM

I'm pretty sure I fixed the soft-delete this time. Had to modify two queries and add a conditional. Added some overdue and new phrases.

TheMilkCarton 03-25-2007 09:59 PM

Is this still not working well? I go to the demo site and get database errors.

thincom2000 03-25-2007 10:24 PM

Yes, this hack is working flawlessly as much as I can tell. The database error you saw was a conflict created by a plugin I had written for another page that isn't part of this hack. There's a workaround, so no worries if you manage to install the same plugin I haven't released yet. ;)

TheMilkCarton 03-26-2007 12:18 AM

Well, installed (again) on my forum and I get a database error. This is maybe my 3rd or 4th attempt at using this. :mad:

Uninstalled (again)

thincom2000 03-26-2007 12:44 AM

It really doesn't help if you don't tell me what the database error is.

TheMilkCarton 03-26-2007 01:02 AM

Code:

Invalid SQL:

              SELECT post.*, thread.*, post.iconid AS miconid, post.attach,
                      icon.title as icontitle, icon.iconpath,
                      attach.dateline AS attachdate, attach.thumbnail_dateline, attach.filename, attach.filesize, attach.visible AS attachvisible,
                      attach.attachmentid, attach.counter,
                      IF(attach.thumbnail_filesize > 0, 1, 0) AS hasthumbnail, attach.thumbnail_filesize,
                      attachmenttype.thumbnail AS build_thumbnail, attachmenttype.newwindow,
                      user.lastactivity, user.lastvisit, user.options, user.usertitle, user.homepage,
                      IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, user.usergroupid,
                      user.membergroupids
              FROM tmc_thread AS thread
              LEFT JOIN tmc_post AS post ON (post.postid = thread.firstpostid)
              LEFT JOIN tmc_icon AS icon ON (post.iconid = icon.iconid)
              LEFT JOIN tmc_attachment AS attach ON(attach.postid = post.postid)
              LEFT JOIN tmc_attachmenttype AS attachmenttype USING (extension)
              LEFT JOIN tmc_user AS user ON (post.userid = user.userid)
              WHERE thread.forumid = 35
                        AND visible IN (0,1,2)
              ORDER BY thread.dateline DESC
              LIMIT 0,10;

MySQL Error  : Column 'visible' in where clause is ambiguous
Error Number : 1052
Date        : Sunday, March 25th 2007 @ 08:13:25 PM
Script      : -----------------/forums/news.php?f=35
Referrer    : -----------------/forums/showthread.php?t=238&goto=nextnewest

I obscured the URL if you're wondering why there are crazy dashes. :)

thincom2000 03-26-2007 01:40 AM

Okay, I'm not sure why you don't want us visiting your site... but here goes:

I was unable to duplicate the error on my forum. We are probably running different MySQL server versions. That doesn't mean I haven't attempted to fix the error.

I have gone through news.php and specified any ambiguous fields. I have also added some hook locations and variables that I had previously removed; hopefully this will avoid possible ambiguities between thread counts and threads displayed in the future.

TheMilkCarton 03-26-2007 03:35 AM

Have you tested this hack out with forums that have been marked invisible? Not sure if it had anything to do with the error, but the forum I got the database error on was set to invisible.

And I'm not ready for any traffic yet, so sorry if that's a problem. :)

As for MySQL version:
Quote:

MySQL Version 4.1.21-standard
copied from my AdminCP

I really wanted this hack to work.. I really like the idea of seeing the thread from forumdisplay. Maybe I'll have to break down and buy GARS. :)

thincom2000 03-26-2007 04:19 AM

I think the forum being invisible just prevents users from seeing it on the forum home or wherever, so this shouldn't be an issue. I'm pretty sure the changes I made should fix at least THAT database error you were having.

My MySQL version is 5.0.27 so I can sometimes overlook some things that may be problematic for older versions of MySQL if they don't give me errors.

TheMilkCarton 03-26-2007 06:04 AM

Yay. It works. Still have a glaring graphical error, but I'll just have to look through the templates. But I'm glad to see that whole Comments text thing was worked out.

One huge problem though.. :) It doesn't obey the default order I had set in the Forum Manager. I set all threads to sort by title, and this does it by date.

Will it be easy to add default sorting options back in? :) Thank you! This is looking very promising.

Make that two graphical errors. When viewing the articles in news.php there is a large gap between the tr with the post, and the tr with the "Edit" and "Quote" buttons. There's an extra
Quote:

<tr> </tr>
and it's taking on my tborder properties I believe. The other error is in shownews.php, where it looks like the entire article is pushed 10px over to the right.. but the comments are fine though. Edit: The comments are in the correct place UNTIL you post in them, and then they move over 10px to the right with the news article.

Ok, make that 3 errors. When a comment is posted the cellspacing is way off from what it should look like in a regular thread.

-----------

Fix for one of your templates: In news_threadbit there was an extra set of
Quote:

<tr> <td></td></tr>
that were empty. Also you have "<if condition="$show['attachments']">" inside of the <tr> tag, you should put the if condition on the outside, since the empty <tr> will show even when there's no attachment. This looked really ugly on my forum, since my tborder was very dark and my alt1 was very light.

And this also just might be personal opinion, but you don't need a "<tr> <td>" wrapped around the "edit note" because it just creates an empty box when there is no edit note. If you really want a box there, you should put it inside the if condition for $show "postedited" so that the box doesn't show up all the time.

EDIT: I get an error when I try limiting the words that show on Newsdisplay. I can't use the BBcode or the method in vB options, I get
Quote:

Fatal error: Call to a member function on a non-object in ...snip.../forums/news.php on line 880

I also get a really messed up table (in Newsdisplay) when a forum that I've designated as a News forum has a description. The Forum name and Description will be stretched across the entire screen, cutting my table in half between the navbar and the first news article.

I've double checked this. I deleted the description from one of the "News" forums and the problem disappears. I thought it had something to do with enabling Announcements (as that's where announcements would show on the news display) but turning them off didn't do anything.

Geez.. Sorry to turn this into such a long post.... Just trying to help out. :) If you could at least figure out the source of the "Fatal Error" that would be great. I can probably figure out the rest on my own, it's probably just problems with the templates.

thincom2000 03-26-2007 10:16 AM

Most of the issues you are having with the templates are actually there on purpose to help with spacing problems some other forums were having. If you are having issues with your own style and CSS go ahead and change the templates to whatever works for you. Unfortunately if you are not posting your forum URL, I can't help you figure out some of those template issues or include any related fixes in the next update, since it would just be hit or miss otherwise. Too bad, the forum description explosion sounds really crazy.

Strange that the fatal error came back, this was fixed in the previous version. I will look into that.

EDIT: Found a few other buggeries in the process of fixing your fatal error. Included in today's fix, which I just uploaded.

thincom2000 03-26-2007 11:23 AM

Quote:

Originally Posted by TheMilkCarton (Post 1212477)
One huge problem though.. :) It doesn't obey the default order I had set in the Forum Manager. I set all threads to sort by title, and this does it by date.

Will it be easy to add default sorting options back in? :)

This has been intended functionality since v1.0.0. You may have noticed that the Forum Search menus have also been removed from News(forum)display. The mentality behind this was that the Forum Search options added about 3 queries to the page (although looking back on it now this may just be sticky threads that do this - and you can't sticky the news anyway -> that's what announcements are for!), and developing it we felt that news was a much more "chronologically" dependent.

If this feature is that important to you, I will consider adding it back to version 1.3.0 later this week, with a little coding trick so that it skips the queries if we are sorting chronologically and as much as possible in other cases.

TheMilkCarton 03-26-2007 04:24 PM

OK, it works now. However, if the article is under the word limit it still displays "... Read more..." Is this normal?

Also, while in Newsdisplay, I notice that there is the typical icon legend at the bottom, but the icons don't actually show up anywhere in the articles.... I may have inadvertently deleted this from the template.. but I'll have to look into that.

I've also been trying to find where in the templates you were compensating for the display problems in other forums.. but I still can't find where you've moved the news postbit and the comment postbit 10px or so over to the right. I'll just have to search through the code more, unless you happen to know offhand where it is. :)

About the article sort order, it is kind of important.. as not all of my articles are News based, and need to be in alphabetical order... Won't it be easy to add a On/Off in the CES Site News options saying something like "Obey Default Sort Field and Default Sort Order?" That way if it's set to no it just defaults to chronological and saves on queries? Not sure how easy that would be though. :)

thincom2000 03-26-2007 06:15 PM

Quote:

Originally Posted by TheMilkCarton (Post 1212817)
OK, it works now. However, if the article is under the word limit it still displays "... Read more..." Is this normal?

This should not be happening, but quickly thinking it over I know where the problem lies. I will fix this for v1.3.0.

Quote:

Originally Posted by TheMilkCarton (Post 1212817)
while in Newsdisplay, I notice that there is the typical icon legend at the bottom, but the icons don't actually show up anywhere in the articles....

You did not delete anything from the templates. The icons will be fixed in v1.3.0.

Quote:

Originally Posted by TheMilkCarton (Post 1212817)
I've also been trying to find where in the templates you were compensating for the display problems in other forums.. but I still can't find where you've moved the news postbit and the comment postbit 10px or so over to the right.

Check your templates spacer_open and spacer_close. Also check the Main Table Width and Spacer Size in your CSS definitions.

Quote:

Originally Posted by TheMilkCarton (Post 1212817)
About the article sort order, it is kind of important.. as not all of my articles are News based, and need to be in alphabetical order...

I was able to bring the sort orders back without bringing back the queries I removed with some tricky JOINs. Looking at it now, I don't know why vBulletin has those extra queries in forumdisplay.

Sort order and the ability to search a news forum from Newsdisplay will appear in v1.3.0.

TheMilkCarton 03-26-2007 06:26 PM

Nice job. :)

I've gone over the template a million times and I've gotten rid of the spacers, moved them around and the news and comment postbits still jut off 10px to the right.

I have a table width of 800px, spacer of 10px, and everything is fine in my normal postbit in showthread, but in shownews there is 20px padding on the left and 10 px padding on the right. This causes the postbit to actually come off the page by 10px on the right side.

I'm going to try comparing source code between shownews and showthread and see where that goes.

Can't wait for 1.3.0 :D

Edit: Comparing the source code, I first noticed that this somehow breaks my RSS feed for my News forum... Clicking RSS up in the URL bar leads me to a blank page if I'm in a forum with your hack, but it works normally in the others. It might not break the feed per-se, but something's not right.

salami1_1 03-26-2007 06:32 PM

Hi,

I got your plugin working at:
http://www.samsunguniverse.com/forum/news.php?f=6

but I really would like to have blog like news included on:
http://www.samsunguniverse.com/index.php
under 'Samsung news' and then not in vbb style. But I still want the messages there also to appear in the forum as it does now.

Is there anyway to do this? I know some php code but divinginto vbb codes.
Thanks for the help!

Steve

thincom2000 03-26-2007 06:39 PM

Quote:

Originally Posted by TheMilkCarton (Post 1212915)
I have a table width of 800px, spacer of 10px, and everything is fine in my normal postbit in showthread, but in shownews there is 20px padding on the left and 10 px padding on the right. This causes the postbit to actually come off the page by 10px on the right side.

I'm going to try comparing source code between shownews and showthread and see where that goes.

There is nothing in the source code that would do that. It seems that there is still a $spacer_open somewhere and no $spacer_close. I will look into this.

Quote:

Originally Posted by TheMilkCarton (Post 1212915)
this somehow breaks my RSS feed for my News forum... Clicking RSS up in the URL bar leads me to a blank page if I'm in a forum with your hack, but it works normally in the others. It might not break the feed per-se, but something's not right.

This issue has come up before. You need to rename news.php to something else. Then set the new filename in the AdminCP (this problem is why the setting was created) and everything should work fine.

TheMilkCarton 03-26-2007 06:43 PM

I already did that though... because I didn't want it named news.php or shownews.php. I wasn't aware this was to fix RSS.

How ironic. I'm going to disable this plugin and see if I still have the problem.

Quote:

There is nothing in the source code that would do that. It seems that there is still a $spacer_open somewhere and no $spacer_close. I will look into this.
I meant that comparing source codes would help me figure out what was missing in the templates. :)


Edit: It just acts very strangely when I have the forums turned off. :) However, in news and shownews.php I don't get a dropdown box like I should when clicking on the RSS button. It takes me to the same RSS feed I would get if I clicked on the RSS button the main forums. In shownews and news.php it should be giving me a dropdown to select the RSS feed for that specific forum. I'm not really worried about this though... I'm not even sure I'm going to keep RSS enabled anyway :)

thincom2000 03-26-2007 07:03 PM

Quote:

Originally Posted by salami1_1 (Post 1212920)
I really would like to have blog like news included on:
http://www.samsunguniverse.com/index.php
under 'Samsung news' and then not in vbb style. But I still want the messages there also to appear in the forum as it does now.

Is there anyway to do this? I know some php code but divinginto vbb codes.

There is actually a way built into news.php to do something similar to this. First, you would have to make your own template so that it looks the way you want. Let's call it news_threadbit_main. You might have newsdisplay_main also (but this might take you some time).

In your .htaccess file, add new rewrite rule. If the rewrite engine is not yet on just say "RewriteEngine On"

In this case, your new rule would be:
Code:

RewriteRule ^index.php$ news.php?do=main&f={FORUMID} [L,QSA]
Create a plugin at cache_templates:
PHP Code:

if ((THIS_SCRIPT == 'newsdisplay') AND (MAINNEWS == true))
{
    
$globaltemplates[] = 'news_threadbit_main';
    
$globaltemplates[] = 'newsdisplay_main';


Create a plugin at global_start:
PHP Code:

if ((THIS_SCRIPT == 'newsdisplay') AND (MAINNEWS == true))
{
    
$vbulletin->templatecache['news_threadbit'] = $vbulletin->templatecache['news_threadbit_main'];
    
$vbulletin->templatecache['NEWSDISPLAY'] = $vbulletin->templatecache['newsdisplay_main'];


Hope that helps!

TheMilkCarton 03-26-2007 09:29 PM

I almost got everything sorted out.... I keep adding spacer_open and spacer_close everywhere and shownews is almost looking right now. Whenever there are no comments, the "No Comments" box stretches to 100% width though, so now I need to figure out where to put more spacer_open and closes.

I think I read somewhere in this thread where someone was having problems, so you "fixed" the spacer stuff in your next release.. Well I definitely think that person had something wrong with their board, since I haven't touched my spacer templates, and maybe you should look into fixing it back the way you had it.. Just a suggestion though. :)

Edit: I had to add another spacer into the news_comments template so that articles with no comments would show correctly.

I also had to completely comment out the "Forum Description" type stuff in my navbar. It was really acting up with forums that had descriptions in news and shownews.

I also noticed a bunch of extra whitespace at the bottom of the popup when you click on the poster's name... sure it's easy for me to fix in the template though. :)

thincom2000 03-26-2007 10:03 PM

Quote:

Originally Posted by TheMilkCarton (Post 1212933)
However, in news and shownews.php I don't get a dropdown box like I should when clicking on the RSS button. It takes me to the same RSS feed I would get if I clicked on the RSS button the main forums. In shownews and news.php it should be giving me a dropdown to select the RSS feed for that specific forum. I'm not really worried about this though...

I'm unfamiliar with the "RSS button" of which you speak. Is this another hack, or vBulletin's stock RSS Feeds feature?

Also, you mentioned Main Table Width is 800. What is your Form Width?

Quote:

Originally Posted by TheMilkCarton (Post 1213109)
I also had to completely comment out the "Forum Description" type stuff in my navbar. It was really acting up with forums that had descriptions in news and shownews.

If you're not ready to post a link, maybe a screen shot? I would like to look into this since it makes absolutely no sense.

thincom2000 03-27-2007 06:07 AM

Anyway I found the source of the spacer problems and that fix is included for sure this time. As for the forum description, that is handled like any other forum, so I don't see the reason you are having problems. Maybe once you switch to the updated 1.3.0 templates it will go away, since apparently there are a bunch of template changes I never released.

thincom2000 03-27-2007 04:12 PM

Found another bug. Not sure if it was in 1.2.4 or just appeared in the process of updating the product, but when an article has more than 1 attachment, only the first attachment shows on Newsdisplay.

If this was not the case in earlier versions, don't worry about it, because it has been fixed in the next update.

thincom2000 03-28-2007 10:05 AM

Quote:

Originally Posted by TheMilkCarton (Post 1214235)
Have you tried adding a forum description on one of your own news forums to test it out?

And just being nosy... is 1.3.0 coming along well? :) I'm very excited for all your changes

All of the forums on my site have Forum Descriptions working without problems...

Version 1.3.0 is coming along very well. I hope to sit on the release another day or so to sort out any bugs I may not have noticed yet and to think of any other features to add. As of yesterday working on 1.3.0 resulted in the discovery of another Forumdisplay optimization that I will release soon as well.

thincom2000 03-28-2007 11:42 PM

I didn't realize it did that. Of course I'll add the Who's Online Location.

thincom2000 03-28-2007 11:49 PM

Here's the Changelog so far for v1.3.0. If you want anything to make it into this update that you don't already see here, let me know.

Code:

As of Version 1.3.0:
- simplified threadbit processing with function calls
- simplified comment header code
- fixed thread icons
- fixed spacer problems on Shownews
- fixed bug on Newsdisplay where only 1 attachment would show
- added forum sorting tools to Newsdisplay
- added attachment paperclip & count to Newsdisplay
- added new hook locations (integration with CES Pre-Processing Hooks)
- added Who's Online Locations
- added missing phrases
- added template group for easier template editing
- renamed all templates
- templates ready with forum headers (integration with vbWiki Pro)
- moved search tools from above comments to above article on Shownews
- updated files: news.php, shownews.php, ces_news_functions.php


thincom2000 03-29-2007 02:31 AM

No you don't. But if you do install Pre-Process Hooks (which I recommend, so far I've been able to take 1 query out of showthread, and next update - found 1 to take out in forumdisplay while making 1.3.0), you don't need to edit the 1.3.0 files. Also the Pre-Process Hooks reduce tons of queries in Event Forums if you have that mod or were considering it.

To answer your question about the sorting: default sort order and sort options both work.

thincom2000 03-29-2007 03:18 AM

I would honestly wait on the Pre-Process Hooks install until I add the forumdisplay_preprocess hook to the product and install instructions.

thincom2000 03-30-2007 04:20 AM

Wow, I remember that. I'm surprised I still hadn't fixed it.

thincom2000 03-31-2007 01:49 PM

Version 1.3.0 has been released. There's a lot of changes in this version. If you find anything else, let me know.

EDIT: I have already fixed the Quick Reply/Multiquote bug for the next update, but I would like to hold it back until some people can confirm they haven't found any others.

thincom2000 04-02-2007 03:32 AM

I don't know why you needed to do that. I hardcoded the spacer into the comments template...


All times are GMT. The time now is 01:09 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.01564 seconds
  • Memory Usage 1,898KB
  • 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
  • (4)bbcode_html_printable
  • (2)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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