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..


All times are GMT. The time now is 11:11 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.01193 seconds
  • Memory Usage 1,751KB
  • 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_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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