vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   vbArticles v0.4 -- For your repository of Articles/Tutorials/FAQs etc. (https://vborg.vbsupport.ru/showthread.php?t=54331)

kaotic 06-15-2003 02:35 AM

Sweet. Updated already. I'm glad I was too lazy to install it the first time. :p

cinq 06-15-2003 06:16 AM

UPDATES
version 0.2 is out

- Added category icon support
- Articles submission by registered members
- admin option of validation of submitted articles


Re-download the attached zip package and read the upgrade txt file carefully if upgrading from v0.1

For fresh installation , pls read the readme txt file contained in the zip package

cinq 06-15-2003 06:59 AM

ADD-ON 1


Was reading up at teckwizards.com with regards to integration this hack w vbHome as requested.

Came upon this thread.

If going by Arunan's instructions, the following instructions should give you similiar result for having articles display on your vbHome portal page.

This add-on assumes you have vbHome installed.

Installation

STEP 1
Open the index.php from the vBhome hack, and find:
PHP Code:

// latest threads
$threadbits '';
$threadmaxnumber '';
if (
$threadmax!=0) {
  
$threadmaxnumber "LIMIT $threadmax";


ABOVE that code ADD:
PHP Code:

// vbArticles
$ebg $DB_site->query("SELECT * FROM vbArticles_cat ORDER BY catname");
if (
$DB_site->num_rows($ebg)) {
  while (
$myrow=$DB_site->fetch_array($ebg)) {
            
$hasattach=1;
            
$catid=$myrow["artcatid"];
            
$catname=$myrow["catname"];
            
$catdesc=$myrow["catdesc"];
      eval(
"\$catlistbit .= \"".gettemplate('home_articlecatbit')."\";");
  }
}
eval(
"\$vbhacats .= \"".gettemplate('home_articlemain')."\";"); 

Still in the index.php file find: (This will reduce your queries by 1 or 2)
PHP Code:

$templatesused 'home,home_articlebits,home_footer,home_header,home_headinclude,home_thread,home_threadbits,home_welcomeguest'

and REPLACE with:
PHP Code:

$templatesused 'home,home_articlebits,home_footer,home_header,home_headinclude,home_thread,home_threadbits,home_welcomeguest,home_articlemain,home_articlecatbit'

Save the index.php file

STEP 2

Create a new Template, and call it home_articlemain, put the following code in :
PHP Code:

<table cellpadding="0" cellspacing="0" border="0" bgcolor="#555576"  width="100%">
<
tr>
<
td>
<
table cellpadding="4" cellspacing="1" border="0"  width="100%">
<
tr id="cat">
          <
td bgcolor="#606096"><smallfont><font color="#FFF788"><b>Articles</b></font></smallfont></td>
</
tr>
$catlistbit
</table>
</
td>
</
tr>
</
table>
<
br

Create another template and call it home_articlecatbit and put in this code :
PHP Code:

<tr>
<
td bgcolor="#13486D"><smallfont>
<
b><a href="$bburl/articles.php?s=$session[sessionhash]&action=viewcat&catid=$catid">$catname</a></b><br>
$catdesc
</smallfont></td>
</
tr

STEP 3

Now open the home template from the vBhome template group, and find:
PHP Code:

$advertisement 

below it ADD:
PHP Code:

$vbhacats 


Not tested on my end

- If you have this working on your vbHome site , pls let me know your site URL so i can add it as a demo for this add-on.

Dean C 06-15-2003 09:10 AM

Very nice hack :)

Kars10 06-15-2003 10:00 AM

There is a small bug in it. In the recent articles section the date and author are not displaying.

search for:

PHP Code:

eval("\$catlistbit .= \"".gettemplate('vbArticles_catbit')."\";");
  }
}
$asb $DB_site->query("SELECT * FROM vbArticles_content WHERE valid='1' ORDER BY artid DESC LIMIT 5");
if (
$DB_site->num_rows($asb)) {
  while (
$myrow=$DB_site->fetch_array($asb)) {
            
$artid=$myrow["artid"];
            
$title=$myrow["title"];
            
$byline=$myrow["byline"];
      eval(
"\$top5listbit .= \"".gettemplate('vbArticles_artbit')."\";");
  }


replace it with:

PHP Code:

eval("\$catlistbit .= \"".gettemplate('vbArticles_catbit')."\";");
  }
}
$asb $DB_site->query("SELECT * FROM vbArticles_content WHERE valid='1' ORDER BY artid DESC LIMIT 5");
if (
$DB_site->num_rows($asb)) {
  while (
$myrow=$DB_site->fetch_array($asb)) {
            
$artid=$myrow["artid"];
            
$title=$myrow["title"];
            
$byline=$myrow["byline"];
            
$author=$myrow["author"];
            
$date=$myrow["date"];
      eval(
"\$top5listbit .= \"".gettemplate('vbArticles_artbit')."\";");
  }


Thanks
Kars

cinq 06-15-2003 01:27 PM

Thanks for the report Kars, updated the zip file with the neccesary changes. :)

Kars10 06-15-2003 01:28 PM

No Problem cinq. :)

Kars10 06-15-2003 01:40 PM

Maybe someone is interessted in displaying a Articles count on Forumhome...

Just search for:

// get newest member

above it place:

PHP Code:

// Tutorials
$counttutorials $DB_site->query_first("SELECT COUNT(*) AS artid FROM vbArticles_content WHERE valid='1'");
$totaltuts number_format($counttutorials['artid']); 

Than open your forumhome template and place Total Articles: $totaltuts anywhere you like. :)

Repec 06-15-2003 02:17 PM

ive installed version 0.2 but when i try and add an article the submit button doesnt work.

You can click it and thats about it, doesnt do anything

cinq 06-15-2003 02:21 PM

Any ideas on how else to improve it ?

If now will push it to v1.0 status and move it to Full Release section and call it a day LOL :D


All times are GMT. The time now is 10:35 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.01848 seconds
  • Memory Usage 1,780KB
  • 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
  • (11)bbcode_php_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