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)

cinq 06-13-2003 10:00 PM

vbArticles v0.4 -- For your repository of Articles/Tutorials/FAQs etc.
 
UPDATES
version 0.4 is out

- Now allows for basic VBCODE input.
- Fixed somemore bugs.


Background
Required a section on my site to display articles/tutorials
No such hack in the Hacks Database
Decided to try my hand at it


ACKNOWLEDGEMENTS
This hack uses a lot of code from Arunan Sridharan's vB Links Directory v2.0
I use that hack too and was inspired to code something around that
A big thank-you must go out to him for coding the Links Directory in the first place (I merely modified much of the code to suit my needs for this hack)

Appreciation also goes out to Kars10 for aiding me in this hack
He coded the portion in version 0.3 on number of articles count as well as article hits count
He also suggested several template changes which have been incoporated into version 0.3
A great big special shout out to TheComputerGuy, 97cobracpe, dontpanic for stamping out the bugs with your fixes. Thanks guys :D


WHATS IT DO ?
This hack allows you to have a database of articles/tutorials etc on your site/forums.

FEATURES

AdminCP
Installer script

Admin options

View Categories
Edit Categories
Add Categories ( category name, category icon, category order, category description )
Delete Categories
Add new article ( title, description, author, date, content )
Edit article
Delete article
View ALL articles in database
Option in vB options to turn validation of articles on/off
Fully template based as to how you wish to display the articles,categories and main article home page.
Addition of articles accepts basic VBcodes

Member options

View Categories
Browse Categories
View articles
Submit new article
Submission of articles accepts basic VBcodes


INSTALLATION & UPGRADING
This Hack should work on ALL 2.2.x versions and v2.3.0
Please read the install_readme.txt file in the package for fresh installation instructions
IMPT: If you installed a previous version pls read the upgrade_readme.txt file carefully for upgrade instructions


HACK DOWNLOAD

Version 0.4 of this hack can be downloaded here


ADD-ONS
i) Add-on for vbHome
ii) Add-on for ForumHome
iii) Add-on to enable only registered members to be able to view the article section


DEMO SITES
http://www.runaked.com/forums/articles.php ( running v0.4 ) - TheComputerGuy's site

http://www.mcseworld.com/forums/infocenter.php ( running v0.3 ) - dontpanic's site


Feel free to submit your sites if u installed this hack so it can be listed as another live demo site


SUPPORT
I cannot promise any support on this as i am pretty new to this but I will try my best.
If you are using this hack , pls click the INSTALL button
to be kept in the loop of any bug reports, add-ons and hack version updates.

Thanks everyone :)

cinq 06-14-2003 03:01 PM

Progress update : 27/10/2003

For next version : 0.5

Accommodated Features and Bug Fixes

Bugs Fixed

Post 202 ( bug fix )
Post 215 ( bug fix )
Post 226 ( bug fix )
Post 230 ( bug fix )
Posts 214-225 , 233-237 ( bug fix )


Feature Requests and other Additional Features that have been implemented ( completed )

- Category Icon upload
- Much easier navigation, less redundant navigation
- Posted By field for articles where the original author is different from the person who uploaded it
- In adding of article, no longer need to enter date of article, it is automatically added as a timestamp
- Adding of article in AdminCP easier
- Editing of article allows moving into another category if wrongly placed
- Easier management of View All Categories ( edit, delete, view articles in category, update order )
- Update order of categories now similar to vbulletin?s method
- Easier management of View All Articles ( edit, delete, view article )
- Author name automatically entered in AdminCP when adding article
- Cleaner code
- Print article , printer friendly.
- Email article to a friend link
- Ability to search articles by title, author and content
- Pagination of article ( pagebreak string set by admin )
- Pagination of articles under each category ( number of articles shown per page set by admin )





Features yet to be implemented

Post 229
I am trying to figure out how to put thumbnail images in front of the reviews. Like the categories currently have.
Post 213
Image lead-in to article

Ratings per article
Comments per article
1 level Subcategories
User group options
Category and article icon resizing





Feature requests that will be turned down and NOT implemented

Post 198
2. Make the "Content" field look more like the posting field in vBulletin.
3. In addition to allowing for vbCode, also have the vbcode buttons above the "Content" box
4. An option in the ACP to allow/disallow vbCode and HTML and have the suggestion #3 above show or don't show based on this setting.

Cinq : I will try to implement something else that is similar but not exactly like this. Hopefully WYSIWYG though.

Post 209
xHTML ?

Cinq : Not proficient enough, sorry.

Post 213
6) Copy an entire article or category (this is very helpful for using articles or cats as templates for future articles, or perhaps archiving old ones
10) XML RSS Feed output

Cinq : 10 - not proficient enough, sorry. 6 ? nah, don? be lazy :p

Post 213
7) Is it possible to select that a lead-in will link to an off-site article directly (by URL)

Cinq : think I'll skip this as well, may have copyright issues plus I'm lazy :p


cinq 06-14-2003 03:03 PM

Download hack here


Latest dated 01/08/2003.
All bugs and fixes in ALL posts before post 183 taken care of :)

kaotic 06-14-2003 03:13 PM

I know that I'm admitting to myself how lazy I am if I install/utilize this hack... but I have no problem with that. :) Thanks, cing! Nice modifications.

gmarik 06-14-2003 04:06 PM

Big thanks, this was what I was looking for a long time, great!

xs1 06-14-2003 04:07 PM

is it possible to add html codes ?

Deviant Mind 06-14-2003 04:07 PM

This shoudl come in handy. I'll try it out on my test board later this afternoon

Katana Myronson 06-14-2003 04:23 PM

Good job!

*clicks install*

DrkFusion 06-14-2003 04:33 PM

Very nice job

Xyphen 06-14-2003 04:51 PM

Very very nice, good idea too... good job!

TheComputerGuy 06-14-2003 06:54 PM

Do ya think their would be anyway to take like the 5 newest ones and put those on a like the front page of vB Home?

But thank you so much for this hack, this rocks!!!

Kars10 06-14-2003 07:06 PM

Exactly what ive been looking for, for a very very long time!!!! :)
Thanks so much buddy.

Kars

[high]* Kars10 licks the install button for 10 min. ;)[/high]

gmarik 06-14-2003 08:19 PM

Quote:

Yesterday at 11:54 PM TheComputerGuy said this in Post #12
Do ya think their would be anyway to take like the 5 newest ones and put those on a like the front page of vB Home?

But thank you so much for this hack, this rocks!!!

Where have you been lost? You said you'll skin it...
But a great idea ... :p

TheComputerGuy 06-14-2003 08:26 PM

<a href="http://www.runaked.com/forums/articles.php" target="_blank">www.runaked.com/forums/articles.php</a>

Beta Testing right now...Tried to edit the articles I get this

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/runaked/public_html/forums/admin/vbArticlesadmin.php on line 182

Also someone should point out that if you have the Links hack installed that you do not have to mod the adminfunctions file.

gmaik...Sorry had some personal stuff come up, should be finished soon!

iggy123 06-14-2003 08:34 PM

Quote:

Today at 10:26 PM TheComputerGuy said this in Post #15
www.runaked.com/forums/articles.php

Beta Testing right now...Tried to edit the articles I get this

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/runaked/public_html/forums/admin/vbArticlesadmin.php on line 182


Me too

Kars10 06-14-2003 08:40 PM

Works like a charm here. :)
But one thing, can you make it that people can post there articles there (like in the linkscrpt)? Would make more sense i think.
I have not the time to add every article by myself.

Thanks in advance
Kars

TheComputerGuy 06-14-2003 09:08 PM

I think you could make this work in the supermod or mod folder and just add a link yes?

DrkFusion 06-14-2003 10:47 PM

Quote:

Today at 03:54 PM TheComputerGuy said this in Post #12
Do ya think their would be anyway to take like the 5 newest ones and put those on a like the front page of vB Home?

But thank you so much for this hack, this rocks!!!

Very easy. 2 Ways you can do this

1. Use an include, and include the top5new full url using something like
Code:

include("http://domain.com/links.php?action=whatever4top5new");

2. Check how it is taken in the top5new action and copy the code put it into a new file, and make sure you can access global.php and functions.php and include it to your site, but I am guessing if you want to put it into your site you will have to do code modifications because i am sure you do not want the Links Directory Layout showing up on your front page :) If you do want the links dir page then use the 1st way.

kaotic 06-14-2003 10:54 PM

Public Submissions/Validation Process would make this hack even perfecter! :p

DrkFusion 06-15-2003 12:44 AM

Quote:

Today at 07:49 PM cinq said this in Post #20
In the article content i presume ? If so , yes.




Put the 5 latest articles on the articles home page shouldnt be a problem , will be included in the next version.
But as for putting it on the front page in vbHome , this i aint too sure as I havent tried vBhome yet.
Give me some time on this , but no promises , am new to this too ! :D


Thanks , your site is looking good , will add it to my post as a demo site :)
As for the error you got , I cannot seem to replicate it but it seems iggy123 is facing the same problem , will try my best to look into it.
Could you try deletion of an article ?

It will work, Arunan release a modification for vBhome at teckwizards.com that showed the linksdir categories, all you have to do is change the query around.

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

Kars10 06-15-2003 02:36 PM

@ cinq, i have made a article counter for each category and also a Hitcounter that displays in the article and the recent articles. If you want i can share this code. :)

Kars

Kars10 06-15-2003 02:39 PM

Screenshot:

cinq 06-15-2003 02:47 PM

Quote:

Today at 12:17 AM Repec said this in Post #29
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

Repec , could you check your template vbArticles_addnewarticle.

Better still overwrite it with this one ( same one taken from the template folder in the zip file )

cinq 06-15-2003 02:50 PM

Kars , that would be great :D

Either post here ( or attach the files ) or drop me a Private message , whichever is more convenient for you.

Thanks once again :)

Repec 06-15-2003 02:51 PM

great it works now :D

Kars10 06-15-2003 02:54 PM

@ cinq, n/p. I?ll write it - zip it and send it to you. Just pm me your Email-Adress. :)

Kars

gmarik 06-15-2003 02:58 PM

cinq, you could just make a .zip of that add-on, it would be great, ok?!

gmarik 06-15-2003 03:00 PM

Quote:

Today at 07:36 PM Kars10 said this in Post #31
@ cinq, i have made a article counter for each category and also a Hitcounter that displays in the article and the recent articles. If you want i can share this code.

Code, more code, code, code! :classic:

cinq 06-15-2003 03:02 PM

gmarik , will try to get it out as soon as Kars emails me :)

Really appreciate all the help and encouragement I am getting on this hack , this being my first hack and all.
You folks are a great bunch :)

gmarik 06-15-2003 03:16 PM

Oh, I'll make some template changes and will post them as an add-on, it was a hack everybody has been waiting for a long time.


All times are GMT. The time now is 04:49 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.01684 seconds
  • Memory Usage 1,888KB
  • 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
  • (1)bbcode_code_printable
  • (11)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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