vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   v3 Articles 1.0.1 - [vB 3.0.1] (https://vborg.vbsupport.ru/showthread.php?t=65934)

Paul M 01-04-2005 11:57 AM

It's really not that hard to follow;

If you had 1.0.1 installed before the security patch was issued you can either apply the fixes as detailed in the fix document, or you can download v1.0.2 and just replace the article.php. If you are installing from scratch then just download 1.0.2 - this has the security fixes aplied to it already.

There are more patches & addons in the vb3 addon's forum that you can apply if you wish.

GoTTi 01-04-2005 03:38 PM

what about the attachment file and all the other files in the zip??

should i just upload that and overwrite the thing and run the upgrade.php?

GoTTi 01-04-2005 05:13 PM

is there a way to have things posted in the articles section to be shown on the forum category it belongs to? instead of it just having 2 -'s in it.

mello_mike 01-04-2005 09:26 PM

Quote:

Originally Posted by TRStealth
Hi,

I'm trying to get the 'Featured Article' thing to show up on the index page, but I'm having trouble.

I got the featured_article template to show, but the actual featured article won't.

I've added the following to the index.php page:

PHP Code:

$globaltemplates = array(
    
'FORUMHOME',
    
'forumhome_event',
    
'forumhome_forumbit_level1_nopost',
    
'forumhome_forumbit_level1_post',
    
'forumhome_forumbit_level2_nopost',
    
'forumhome_forumbit_level2_post',
    
'forumhome_lastpostby',
    
'forumhome_loggedinuser',
    
'forumhome_moderator',
    
'forumhome_pmloggedin',
    
'forumhome_subforumbit_nopost',
    
'forumhome_subforumbit_post',
    
'forumhome_subforumseparator_nopost',
    
'forumhome_subforumseparator_post',
    
'article_featured'
); 

then

PHP Code:

require_once('./includes/functions_articles.php'); 

And finally

PHP Code:

// ### Start Articles

        
$featuredarticle unserialize($datastore['featuredarticle']);
        if (
$featuredarticle['id'])
        {
            
$feature $DB_site->query_first("SELECT article.*, articlepost.*, articlecategory.options AS options FROM " TABLE_PREFIX "article AS article
            INNER JOIN " 
TABLE_PREFIX "articlepost AS articlepost ON (articlepost.postid = article.firstpostid)
            INNER JOIN " 
TABLE_PREFIX "articlecategory AS articlecategory ON (articlecategory.categoryid = article.categoryid)
            WHERE article.articleid=
$featuredarticle[id]");
        }
        if (!empty(
$feature['title']))
        {
        
            
// do html
            
if ($feature['options'] & 256)
            {
                
$dohtml 1;
            }
            
            if (
$feature['options'] & 512)
            {
                
$dosmilies 1;
            }
            
            
// get an attachment, if there's one with a thumnail
            
$attachment $DB_site->query_first("SELECT attachmentid FROM " TABLE_PREFIX "articleattachment WHERE articleid=$featuredarticle[id] AND thumbnail_dateline>1 ORDER BY RAND() LIMIT 0,1");
            if (!empty(
$attachment['attachmentid']))
            {
                
$GLOBALS['isattachment'] = true;
            }            
            
            require_once(
'./includes/functions_bbcodeparse.php');
            
$feature['postbody'] = truncate_text($feature['postbody'], $vboptions['featuredlength'], 1);
            
$feature['postbody'] = parse_bbcode2($feature['postbody'], $dohtml0$dosmilies1);
    
            eval(
'$articlecontent .= "' fetch_template('article_featured') . '";');
        }
        
// ### End Articles


// ### ALL DONE! SPIT OUT THE HTML AND LET'S GET OUTA HERE... ###
eval('$articlecontent .= "' fetch_template('article_featured') . '";');
eval(
'$navbar = "' fetch_template('navbar') . '";');
eval(
'print_output("' fetch_template('FORUMHOME') . '");'); 

However, this only displays the template, like I said. It doesn't show the featured article.

Hey I figured out how to add the featured article to the Forum Home...

You basically do everything you just did... plus

add $articlecontent to your FORUMHOME template

also in your index.php file

change
PHP Code:

$specialtemplates = array(
    
'userstats',
    
'birthdaycache',
    
'maxloggedin',
    
'iconcache',
    
'eventcache',
    
'mailqueue' 


to
PHP Code:

$specialtemplates = array(
    
'userstats',
    
'birthdaycache',
    
'maxloggedin',
    
'iconcache',
    
'eventcache',
    
'mailqueue',
    
'featuredarticle'
); 

Now whenever you feature an article it will also show on the Forum home... hope that helps.

mello_mike 01-04-2005 09:33 PM

OH I Just noticed something.. there's a change that have to be made in order to get the featured article from showing up twice on the forum home.

in your Index.php file Change

PHP Code:

// ### ALL DONE! SPIT OUT THE HTML AND LET'S GET OUTA HERE... ###
eval('$articlecontent .= "' fetch_template('article_featured') . '";');
eval(
'$navbar = "' fetch_template('navbar') . '";');
eval(
'print_output("' fetch_template('FORUMHOME') . '");'); 

to
PHP Code:

// ### ALL DONE! SPIT OUT THE HTML AND LET'S GET OUTA HERE... ###
eval('$navbar = "' fetch_template('navbar') . '";');
eval(
'print_output("' fetch_template('FORUMHOME') . '");'); 


GoTTi 01-04-2005 11:08 PM

.........

nathanaus 01-05-2005 10:49 AM

This is going to sound dumb - please don't laugh.

i installed this script/hack. Uhhh how do I actually write an article? In the forum proper you have buttons "new thread" in this hack I see no means in which to write an article.

I visited the vb3articles.com site, and again (as a guest user) saw no ability to write an article. I then registered on that site, and couldn't get back to the article page - because as a registered user I didn't have permission to view the article page, logging out though I did have permission. So as a registered user I couldn't see if there was a new article button or soething there to allow me to actually write the article.

What did I miss there?

Also (I'm new to VB) why are there a whole other set of "add ons" fo this? Has development on this stopped and moved to someone else?

SoloX 01-06-2005 01:08 AM

I have installed the latest security patch as given out.
I have set the moderate articles on, If I go to the Article category, the article does not appear, but it does appear in the categories list under the 'latest article' column and people can view it (without us approving it first).

How can I make so that the un-approved articles dont appear at all anywhere in the system?

Thanks

Paul M 01-06-2005 01:24 AM

Quote:

Originally Posted by SoloX
I have installed the latest security patch as given out.
I have set the moderate articles on, If I go to the Article category, the article does not appear, but it does appear in the categories list under the 'latest article' column and people can view it (without us approving it first).

How can I make so that the un-approved articles dont appear at all anywhere in the system?

Thanks

The fact people can view unapproved articles is another bug I fixed when I first installed and tested our version. The fact that they appear in the list at all is a more complicated problem to fix and I didn't bother fixing for us - since people could no longer view the article anyway.

I'm off to bed now so I'll dig the first fix out for you tomorrow. :)

dina 01-06-2005 01:38 PM

Something weird is going on with this mod. I just upgraded to 3.0.4 and just reinstalled the mod in the files and it worked fine. Then suddently today I got this e-mail:

Quote:

Database error in vBulletin 3.0.4:

Invalid SQL:
SELECT * FROM articlepost
WHERE type=2 AND articleid=5 AND valid=1
ORDER BY postdateline ASC
LIMIT 0,

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 '' at line 4
I try entering the articles and get the same error again. Before this happened I could view every article and even see the "preview" of one of the articles on top of the page.
Now I can't even view the settings for the articles in vBulletin Options (can view the other settings in admincp though).

I've tried running the install script again, but of course it fails when it tries to add new tables, because the tables are already there.

I don't want to remove the tables from the database and reinstall completely, as I'll lose over a hundred articles.

And yes, I have checked the file changes at least 10 times.


All times are GMT. The time now is 09:05 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.02020 seconds
  • Memory Usage 1,791KB
  • 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
  • (7)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)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