vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=34)
-   -   Article System (https://vborg.vbsupport.ru/showthread.php?t=63941)

Pro 04-17-2004 10:06 PM

lol... ive never done that before...?

i'm a noob - is there anywhere to learn this?

ixian 04-18-2004 04:28 AM

Quote:

Originally Posted by krohnathlonman
Whats the best way to handle a multi page submission like that? just have say 2 pages at a time and post them into hidden form elements?

I wrote this completely with the display end speed in mind. I had to make sure it could handle 150k+ pageviews a day because my site spikes up there often enough that I have to worry about it. I don't want my server crawling from it. In the next release you'll see in the admin panel where it's real easy to turn features off. I'm also writing some global variables for you guys to define!

Thanks for point that <> out... I overlooked it! I'll start testing it after I get my feature list taken care of ;) Something that big will be one of the last things I do! I want to make sure everythings stable and working great before I throw something as big as that into the mix.

This shouldn't affect display speed, it's all on the admin side.

The best way for THIS hack, I think, is as I kind of went into above:

Have ONE text area on the submit page.

Instead of one submit button, have two - one that says submit, one "Next Page" or "Continue" or whatever.

If the user hits submit, that means they are done adding pages, and the article is submitted exactly as it is done now.

If they hit "Next Page", then you have a subroutine that:

Submits the textarea data in the form to it's space in the db table.

Brings up a new window, textarea field called p2 like you have it now.

And so on.


OR

Have it be all one page for submitting the form/textarea data, and have the user insert a custom tag like <pagebreak> or something where they want new pages to start. Adding a button to do that automatically in HTMLArea - so the user just puts the cursor where they want the new page to start and clicks "New Page" - is so simple it's not even funny.

Now, I know you are worried about load, and that is a valid concern of course. However, you are missing something here. The <pagebreak> tag I talk about above isn't something that gets processed every time someone views an article. It's post-processing done when you submit the article. In fact, your article.php and the rest of your code won't need to be modified at all. Just the add article file.

What you do is add a routine for the pagebreak tag, and have each section submit to your table/pages. Something like this:
PHP Code:

$textarray=spliti("\[PAGEBREAK]",$text); 

Would work. Use spliti to split the text for you (spliti is case-insensitive unlike split). Now you have php doing all the work for you when you submit an article. And as I said, this is NOT done on the viewing side - it doesn't change a thing. This is all done on the submit side.

If you want, when you get your latest changes uploaded (you really need something to handle categories, but you already know that) I'd be happy to work on part of this for you. Just let me know.

ixian 04-18-2004 04:35 AM

Quote:

Originally Posted by Pro
lol... ive never done that before...?

i'm a noob - is there anywhere to learn this?

Go to your admin cp.

Scroll down to where you see "Import and Maintenance"

Click it.

Click "execute a SQL query".

Paste in the text from the articles.sql file.

Done.

BACK UP your database first.

Pro 04-18-2004 06:24 AM

Quote:

An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: 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 ';

CREATE TABLE amartinref (
article smallint(6) NOT NULL
could this be from installing phpMyAdmin tonight??? :\

please help - i would like to get this articles program up and running!

ixian 04-18-2004 06:36 AM

No, phpadmin would have nothing to do with it. But if you have phpadmin why aren't you using that? Use the SQL option on the vbulletin db and paste the text in there.

I think, now that I think about it (pun!) that vb's sql query feature restricts you to one query at a time. That's probably the issue there.

Jon Ward 04-18-2004 09:07 AM

Hi everyone -

A small problem which may also need correcting in a future release ...

Like many people I choose to adopt a prefix when setting up database tables to identify which script they belong to - this is an option for VBulletin, of course.

However, this causes a problem with articles.php in at least one SQL statement (c line 35) where hard reference is made to 'thread', one of the (unprefixed) VB table names. (The prefix setting config.php in /includes doesn't figure in the proceedings ...) There may well be other instances

Thanks K and everyone else helping this project through!

Jon

The Dok 04-18-2004 01:38 PM

when I call up the forum/articles.php all I get is a white page. I've looked over the install instructions and everything looks correct... but seeing that I'm an extreme noobie to this stuff, I don't know. Any thing I need to look at specifically?

Thanks

Silverdawn222 04-18-2004 02:39 PM

Did the template files you created go into the right style?

The Dok 04-18-2004 03:28 PM

Yes, I only have one available to the members.

Pro 04-18-2004 04:51 PM

Quote:

Originally Posted by ixian
No, phpadmin would have nothing to do with it. But if you have phpadmin why aren't you using that? Use the SQL option on the vbulletin db and paste the text in there.

I think, now that I think about it (pun!) that vb's sql query feature restricts you to one query at a time. That's probably the issue there.

i'm still trying to set it all up (phpMyAdmin)... but this stuff is confusing! lol

when i try to set THIS up i get THIS error lol...

Quote:

MySQL said:


#1045 - Access denied for user: 'root@localhost' (Using password: NO)
i thought i edited the config file right... guess not... im not sure how to connect it to my database..

Pro 04-18-2004 04:53 PM

nevermind... got phpmyadmin now... gotta figure out the rest!

Pro 04-18-2004 05:24 PM

Quote:

Warning: main(config.php): failed to open stream: No such file or directory in /home/illicitr/public_html/board/articles.php on line 12

Fatal error: main(): Failed opening required 'config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/illicitr/public_html/board/articles.php on line 12
i keep getting this... any clues what im doing wrong now?

krohnathlonman 04-18-2004 05:44 PM

Thanks for everybodies help on this! I'm learning alot as I go along... I never knew about the spliti function at processing time. I'm also getting a bit of help on the categories system. If would be great to get this thing to be able to handle an unlimited number of pages. Currently I have a number of hardcoded number related things that I'm going to need some help overcoming.

My next release will have some options in the admin panel to easily turn a number of things on/off. It's been alot of work getting this thing working just right in VB Yesterday I spent most of my development time making as many queries as possible optional. I still have to do some more with things like $unset and clean alot of things up. The next time I upload anything will be a while. I'm going to hold out for most of the features to be completed.

The table prefix issues will happen anywhere it calls for a VB table. I don't use a special prefix on any of my DBs so this was something that I overlooked. I'll make sure that I add that extra case in for that. Currently the only thing it's grabbing from the forum DB is the latest topics. not too far down in articles.php you'll see a line called $rec look inside the query and put in your table prefix if you want this to work right.

The Dok 04-18-2004 06:35 PM

Quote:

Originally Posted by Pro

Quote:

Warning: main(config.php): failed to open stream: No such file or directory in /home/illicitr/public_html/board/articles.php on line 12

Fatal error: main(): Failed opening required 'config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/illicitr/public_html/board/articles.php on line 12
i keep getting this... any clues what im doing wrong now?

Me too

ixian 04-18-2004 08:59 PM

Quote:

Originally Posted by The Dok
Me too


Guys, that's a leftover bit from his previous version. Just open Articles.php with an editor, go to line 7 where the call to config.php is made, and comment it out by putting // in front of the line.

I am sure he will correct this in his next version.

The Dok 04-18-2004 10:03 PM

Quote:

Originally Posted by ixian
Guys, that's a leftover bit from his previous version. Just open Articles.php with an editor, go to line 7 where the call to config.php is made, and comment it out by putting // in front of the line.

I am sure he will correct this in his next version.

Thanks...

I don't get the errors but I get a plain white screen. I'm pretty familiar with some things. For instance I have vbadvanced and have done several other mods to my forum.

Not sure were to go from here... perhaps I should wait until the next version, but if this one works (and it seem to for everyone else - which points the problem to me :rolleyes:) it is something I actually need pretty badly. Anyway, if anyone knows where I need to look or what I need to do please let me know, if not - no problem.

Thanks in advance.

n8

Pro 04-19-2004 01:57 AM

alright! works now... just gotta figure out how to take these ad's off of here now lol...

also - how can i change the RECENT topics from showing? ehhh ill try to figure it out... i'd like some tips for the ad's tho :)

thanks IXIAN! and krohnathlonman for a great hack! well - more than a hack lol...

zennifer 04-19-2004 02:01 AM

So I have run into a problem. If your article has a single quote in it ' you can add it with no problems but when you go back to edit it you get an error. Any suggestions on how to fix this?
-Jenn

ixian 04-19-2004 02:26 AM

Quote:

Originally Posted by Pro
alright! works now... just gotta figure out how to take these ad's off of here now lol...

also - how can i change the RECENT topics from showing? ehhh ill try to figure it out... i'd like some tips for the ad's tho :)

thanks IXIAN! and krohnathlonman for a great hack! well - more than a hack lol...

Sounds like you have the "old" version still dude. He updated the download in his first post but forgot to edit said post to reflect the recent change. Download the hack again.

Quote:

Originally Posted by zennifer
So I have run into a problem. If your article has a single quote in it ' you can add it with no problems but when you go back to edit it you get an error. Any suggestions on how to fix this?
-Jenn


Post the error. Sounds like your standard PHP not seeing escape character issue, but you need to post the error message so we know what line it's happening on.

Pro 04-19-2004 03:15 AM

Quote:

Sounds like you have the "old" version still dude. He updated the download in his first post but forgot to edit said post to reflect the recent change. Download the hack again.
Odd... i downloaded it last night... this will be the third time lol...

thanks

krohnathlonman 04-19-2004 10:14 AM

I just noticed my problem with editing when I went to edit some articles on my site. I did recently rewrite pretty the whole admin side of things. I'll have to take a look at the two versions and figure out what I did so differently.

joeychgo 04-19-2004 10:21 AM

Looks like your doing a great job on a great hack. Im anxiously awaiting a version a newbie like me can install ----

spence2 04-19-2004 12:20 PM

Would you possibly consider in your re-write allowing article posting by usergroups in addition to admin?

Thank you for your work on this!

krohnathlonman 04-19-2004 12:37 PM

Yeah, I'm considering going about it through usergroups, but that would make me write something like a /articlecp and making a somewhat seperate admin panel. It's not that hard to do. Basically just a usergroup check at the TOP of the admin panels.

I have something like this in my printer file.

PHP Code:

     $guest 1;
    
if (
is_member_of(array('userid'=>$bbuserinfo['userid'], 'usergroupid'=>$bbuserinfo['usergroupid'], 'membergroupids'=>$bbuserinfo['membergroupids']), $guest)){
    echo 
"Registered members only\n";
 
 } 

you'll have to reverse it in this case though cause you only want certain groups to see the pages :)

Hialls 04-19-2004 01:01 PM

ah good you listened to me :D

spence2 04-19-2004 01:06 PM

Basically, which usergroups can post articles, view articles and post comments.

A master list of contributors, alphabetized & paginated, with links to their articles (paginated).

And could the admin retain control of the types (categories) of articles that are allowed to be submitted?

You're doing great work and it is very appreciated by all!

Pro 04-19-2004 05:12 PM

IXIAN... i don't see any difference in any of the files i recently downloaded again... everything looks the same to me?

Anyways - i've been installing so much stuff lately i'm getting kind of lost here.

this may be the dumbest question in the thread... but HOW do i write the articles??? or ADD new articles...?

Acido 04-19-2004 05:17 PM

Quote:

Originally Posted by Pro
IXIAN... i don't see any difference in any of the files i recently downloaded again... everything looks the same to me?

Anyways - i've been installing so much stuff lately i'm getting kind of lost here.

this may be the dumbest question in the thread... but HOW do i write the articles??? or ADD new articles...?

I cant reply the article (feedback). Sorry but i cant test this hack as it was released in despite of the fact that it is just a beta :(

Pro 04-19-2004 05:18 PM

haha... im dumb. i see it now in the admicp... wow ive been staying awake too long. :)

krohnathlonman 04-19-2004 05:23 PM

Acido, look at the NAME of this forum... This forum is designated for beta hacks. If you don't want anything to do with beta hacks then don't browse this forum!

You must put the URL to Feedback in the Designated Feedback field when posting an article.

I've given Ixian all the latest updates. I'm not doing anymore work on this this week. I've got too many things to do.

Pro 04-19-2004 05:39 PM

Hmmm... curious now. (yeah i know i ask alot of questions) How do you figure out how big each page is?

I need to transfer some of my old HTML files to this and i need to know how to deal with the page size? Does it go to a certain amount of characters or what?

krohnathlonman 04-19-2004 05:47 PM

MySQL limits you for to 65,000 characters since it's using "text" whereas mediumtext is 16 million

Didn't really plan on really large pages since it's built for multiple pages.

Pro 04-19-2004 06:01 PM

okay that's cool - i just wasn't sure if it might be something like 1,000 like VB or something.

Sounds even better! Thanks for the great "hack"! Now my vBadvanced is almost a true portal lol...

Pro 04-19-2004 06:03 PM

lol how do we delete the pages? :( i tried a test and now i can't seem to figure out how to delete it - also - it shows TWO articles on the test part... meaning: i neamed the test page "test" and it shows up twice????

ixian 04-19-2004 10:50 PM

I am working on this while krohnathlonman takes care of some stuff. Right now I am fixing a couple things, then I am tackling the pagnation issues and HTMLArea. It's gonna be a few days, so be patient.

spence2 04-20-2004 02:26 AM

After the ordeal of waiting for Jelsoft to perfect vB3 anyone who has not learned patience by now "just can't get with the program!" ;)

Pro 04-20-2004 06:54 AM

LOL i know you guys probably hate me... but...


[QUOTE=krohnathlonman]
You must put the URL to Feedback in the Designated Feedback field when posting an article.QUOTE]

What does that mean? was there a feedback thing with this? or do you mean a URL for the forums or something?

:ermm: confused...

sorry guys... :rolleyes:

krohnathlonman 04-20-2004 01:56 PM

In the add article system.... there should be a field that is called FEEDBACK. That is where you put your feedback URL.

The VB "portals" are really nothing more than news pages. After the code on this is stabilized I plan on building a completely integrated solution that will approach vbportal in features. This will only happen if I still have the free time ;) The query to grab the news is actually very simple. I've got the latest topics already. a WOL is going to come pretty soon.

Next time I get a chance to work on this it'll be to start making it more portal like and building in even more user configurable options than the current build.

The Dok 04-20-2004 02:01 PM

Quote:

Originally Posted by krohnathlonman
In the add article system.... there should be a field that is called FEEDBACK. That is where you put your feedback URL.

The VB "portals" are really nothing more than news pages. After the code on this is stabilized I plan on building a completely integrated solution that will approach vbportal in features. This will only happen if I still have the free time ;) The query to grab the news is actually very simple. I've got the latest topics already. a WOL is going to come pretty soon.

Next time I get a chance to work on this it'll be to start making it more portal like and building in even more user configurable options than the current build.

That would be great... I have an article based site and have a portal as well. This idea would be perfect for me....

Thanks for working on this, I look forward to the end result.

Pro: do you mind if I PM you?

TD

SmasherMaster 04-20-2004 02:36 PM

A HTL version would be absolutly fantastic!!!! Would this article hack also be able to double as a reviews/cheats hack as well with some mods?


All times are GMT. The time now is 11:47 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.01407 seconds
  • Memory Usage 1,852KB
  • 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
  • (2)bbcode_php_printable
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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