Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vbArticles v0.4 -- For your repository of Articles/Tutorials/FAQs etc. Details »»
vbArticles v0.4 -- For your repository of Articles/Tutorials/FAQs etc.
Version: 1.00, by cinq cinq is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 06-13-2003 Last Update: Never Installs: 48
Is in Beta Stage  
No support by the author.

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


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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #122  
Old 07-10-2003, 04:05 AM
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
Posts: 1,398
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
07-04-03 at 06:41 AM 97cobracpe said this in Post #114
Your right, it should. But this hack was designed using the link directory hack as a model. With the other hack, there is no need to have auto formatting built into it as everything is one line big. Maybe in the future someone will do more with this hack, but until then this is the way it is. I personally don't mind it. I'd take a stab at it, but I'm no expert at php.
Yes and moreover, features were clearly stated on the very first post of what it CAN do. As well as planned features.
Thanks for the help 97cobracpe, if you manage to get the line break thing working, do drop me a pm to discuss , would sure appreciate it
Reply With Quote
  #123  
Old 07-10-2003, 04:28 AM
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
Posts: 1,398
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
07-02-03 at 10:09 PM cnczone said this in Post #109
When someone fills out all the info (author, date, etc..) than I go to valadite it all the fields are filled with dates not the authors name or the title etc what gives???? Now when I', in the CP panel and correct it it's fine.
Does anyone face the same error ?
Reply With Quote
  #124  
Old 07-10-2003, 05:45 PM
dontpanic dontpanic is offline
 
Join Date: Jun 2003
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
07-05-03 at 07:29 PM kaotic said this in Post #115
I think I know someone that needs to count their blessings instead of bashing them.
Right on. I think this a great hack. It's free and it's someone elses hard work. Why be a d1ck about it?

cing keep up the good work! :rambo:
Reply With Quote
  #125  
Old 07-10-2003, 09:13 PM
Russ_T Russ_T is offline
 
Join Date: Jun 2003
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cinq: just ignore them mate, the little whinney +++++es can go write their own mod and put it up if they are so much better.

If you could get the link going again sometime please I'd like to install and see as this is exactly what I need, and I'll add any productive comments/help I can.

Try to ignore the moaners though, these people are ++++ heads and theres not much you can do to stop them.
Reply With Quote
  #126  
Old 07-11-2003, 06:12 AM
PurpleCow PurpleCow is offline
 
Join Date: Mar 2003
Posts: 222
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cinq :

This sure is such a wonderful hack and great work from your end !

As few others mentioned above, just ignore those who stik their tongue out , just for the heck of it.

Hope the new version1.0 you are working on will be released soon.

Thank you for the hard work
Cheers
Reply With Quote
  #127  
Old 07-11-2003, 04:40 PM
dontpanic dontpanic is offline
 
Join Date: Jun 2003
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent hack first of all!

Found and fixed two small errors in the vbArticlesadmin.php file.

Where you have:
PHP Code:
<a href='vbArticlesadmin.php?action=editarticle&catid=$catid&artid=[COLOR=red]$artid[/COLOR]'><b>Edit</b></a><br>
<
a href='vbArticlesadmin.php?action=removearticle&catid=$catid&artid=[COLOR=red]$artid[/COLOR]'><b>Remove</b></a></td>"; 
You need to change it to this:
PHP Code:
<a href='vbArticlesadmin.php?action=editarticle&catid=$catid&artid=[COLOR=red]$articleid[/COLOR]'><b>Edit</b></a><br>
<
a href='vbArticlesadmin.php?action=removearticle&catid=$catid&artid=[COLOR=red]$articleid[/COLOR]'><b>Remove</b></a></td>"; 
Thanks again cing for a great hack! Can't wait to see what you have in store for the next version!
Reply With Quote
  #128  
Old 07-11-2003, 05:05 PM
dontpanic dontpanic is offline
 
Join Date: Jun 2003
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cing, found another fix that makes it work all but perfectly now I think.

In the vbArticlesadmin.php file, locate:

PHP Code:
                $DB_site->query("UPDATE vbArticles_content SET valid='$val',title='".addslashes(htmlspecialchars($name[$key]))."',byline='".addslashes(htmlspecialchars($desc[$key]))."',author='".addslashes(htmlspecialchars($name[$key]))."',date='".addslashes(htmlspecialchars($name[$key]))."',content='".addslashes(htmlspecialchars($desc[$key]))."' WHERE artid='$key'");
          echo 
"<p>Validated Article: $key</p>\n"
And replace it with:
PHP Code:
                $DB_site->query("UPDATE vbArticles_content SET valid='$val',title='".addslashes(htmlspecialchars($title[$key]))."',byline='".addslashes(htmlspecialchars($byline[$key]))."',author='".addslashes(htmlspecialchars($name[$key]))."',date='".addslashes(htmlspecialchars($date[$key]))."',content='".addslashes(htmlspecialchars($desc[$key]))."' WHERE artid='$key'");
          echo 
"<p>Validated Article: $key</p>\n"
Also, locate:
PHP Code:
    makeinputcode("Title :","name[$link[artid]]",$link[title]);
    
maketextareacode("Description :","desc[$link[artid]]",$link[byline],4,50);
    
makeinputcode("Author :","name[$link[artid]]",$link[author]);
    
makeinputcode("Date :","name[$link[artid]]",$link[date]);
    
maketextareacode("Content :","desc[$link[artid]]",$link[content],10,50);
    
makeyesnocode("Validate:","validatelink[$link[artid]]",1);
    
makeyesnocode("Delete:","deletelink[$link[artid]]",0);
    
maketableheader("&nbsp;","",0);
    
$done=1
And replace it with:
PHP Code:
    makeinputcode("Title :","title[$link[artid]]",$link[title]);
    
maketextareacode("Description :","byline[$link[artid]]",$link[byline],4,50);
    
makeinputcode("Author :","name[$link[artid]]",$link[author]);
    
makeinputcode("Date :","date[$link[artid]]",$link[date]);
    
maketextareacode("Content :","desc[$link[artid]]",$link[content],10,50);
    
makeyesnocode("Validate:","validatelink[$link[artid]]",1);
    
makeyesnocode("Delete:","deletelink[$link[artid]]",0);
    
maketableheader("&nbsp;","",0);
    
$done=1
This should fix any errors that people had when trying to validate submissions from the AdminCP.

:banana:
Reply With Quote
  #129  
Old 07-11-2003, 09:18 PM
iggy123's Avatar
iggy123 iggy123 is offline
 
Join Date: Jan 2003
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

excellenmt - this works great now - just have to remember to format them properly LOL
Reply With Quote
  #130  
Old 07-11-2003, 09:36 PM
dontpanic dontpanic is offline
 
Join Date: Jun 2003
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, If you make the changes below you will be able to accept and validate HTML from the public submission page...of course you still need to get the material in HTML.

In articles.php, find:
PHP Code:
$result mysql_query("INSERT INTO vbArticles_content (categoryid, title, byline, author, date, content, valid) VALUES ('$catid', '".addslashes(htmlspecialchars($title))."', '".addslashes(htmlspecialchars($byline))."', '".addslashes(htmlspecialchars($author))."', '$date', '".addslashes(htmlspecialchars($content))."', $vd)"); 
Replace with:
PHP Code:
$result mysql_query("INSERT INTO vbArticles_content (categoryid, title, byline, author, date, content, valid) VALUES ('$catid', '".addslashes(htmlspecialchars($title))."', '".addslashes(htmlspecialchars($byline))."', '".addslashes(htmlspecialchars($author))."', '$date', '".addslashes($content)."', $vd)"); 
That fixes it so you can submit in HTML and maintain it while it goes into the database.

Now, in vbArticlesadmin.php, find in the DO VALIDATE NEW LINKS section:
PHP Code:
$DB_site->query("UPDATE vbArticles_content SET valid='$val',title='".addslashes(htmlspecialchars($name[$key]))."',byline='".addslashes(htmlspecialchars($desc[$key]))."',author='".addslashes(htmlspecialchars($name[$key]))."',date='".addslashes(htmlspecialchars($name[$key]))."',content='".addslashes(htmlspecialchars($desc[$key]))."' WHERE artid='$key'"); 
And replace it with:
PHP Code:
$DB_site->query("UPDATE vbArticles_content SET valid='$val',title='".addslashes(htmlspecialchars($title[$key]))."',byline='".addslashes(htmlspecialchars($byline[$key]))."',author='".addslashes(htmlspecialchars($name[$key]))."',date='".addslashes(htmlspecialchars($date[$key]))."',content='".addslashes($desc[$key])."' WHERE artid='$key'"); 
No guarantees this will work for you, but I've got it working now that users can submit articles properly formatted in HTML. I can then validate them and they will post formatted in HTML. :rambo:
Reply With Quote
  #131  
Old 07-12-2003, 01:12 AM
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
Posts: 1,398
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Updated the hack with fixes from post 126 and 127.

Thanks a million, dontpanic for pointing them out and providing the fixes

As for post 128, without the change, your users cannot submit HTML content ?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:30 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05397 seconds
  • Memory Usage 2,390KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (10)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete