Welcome, Guest. Please Login or Register.
April 25, 2024, 04:46:02 AM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Save all... « previous next »
Pages: [1] 2 Reply Ignore Print
Author Topic: Save all...  (Read 33197 times)
Jay Silverman
Full Member
***
Posts: 189


And So It Begins.

ICQ - 213566 WWW
Save all...
« on: December 22, 2001, 02:41:00 PM »
Reply with quote

Instead of saving each edit boards change and clicking modify, how about a "save all" type of button, as well as the individual buttons?

I've always wanted one, and just had a friend remind me about it..it would REALLY save some time when you've gotta add a whole bunch of moderators and the such.
Logged
Big P
Mod Team
YaBB God
*****
Posts: 1462


"Back in '68, I don't like you, The End."

ICQ - 76064555pierceward@hotmail.com WWW
Re:Save all...
« Reply #1 on: December 22, 2001, 02:44:03 PM »
Reply with quote

Yep! Thats what i was thinking! YaBB SE makes it easy to move boards and save, but a save all function would be great. But after looking at the code, a lot would have to change, so a mod mightn't work. Maybe on the next version?
Logged

PHPNews has been released!!! Download it now!!!
KenTeamBG
Guest
Re:Save all...
« Reply #2 on: December 22, 2001, 04:17:56 PM »
Reply with quote

A save all is tricky in this situation, as forms in HTML are an archaic thing.  Nested forms are a mess and such.  So you cannot safely have one form and then another and have those two inside one parent form and have that submit both or something.  About the only real way of doing this is to have a javascript that on the onsubmit event of a dummy form will cycle through all the forms on the page and submit them all, even that is tricky sometimes, but it is doable...using element collections, my largest fear would be Crapscape and other non-devloper friendly browser wannabes.

Logged
Big P
Mod Team
YaBB God
*****
Posts: 1462


"Back in '68, I don't like you, The End."

ICQ - 76064555pierceward@hotmail.com WWW
Re:Save all...
« Reply #3 on: December 22, 2001, 04:29:47 PM »
Reply with quote

Actually it wouldn't be that hard. The only problem would be it check all the forms with data, searching etc. That could be bad for a server if you have loads of boards, whereas saving one file was easy and board friendly. ;)
Logged

PHPNews has been released!!! Download it now!!!
KenTeamBG
Guest
Re:Save all...
« Reply #4 on: December 22, 2001, 04:31:12 PM »
Reply with quote

I did not say it would be hard, I said its problematic...which is true when you know how forms in HTML work.
Logged
Joseph Fung
Global Moderator
YaBB God
*****
Posts: 4512


Keep smiling: it makes others nervous.

WWW
Re:Save all...
« Reply #5 on: December 22, 2001, 06:06:00 PM »
Reply with quote

It's easy as hell to do.  I thought about doing it - but when you have any decent number of boards - it's a huge number of fields being submitted in the form - which would slow down the save time for people on slow connections.

In the end I decided not to do it for to reasons
1: to keep the information submitted small
2: to keep it more y1g-like
Logged

Big P
Mod Team
YaBB God
*****
Posts: 1462


"Back in '68, I don't like you, The End."

ICQ - 76064555pierceward@hotmail.com WWW
Re:Save all...
« Reply #6 on: December 22, 2001, 06:09:20 PM »
Reply with quote

Just what I said!  :P I knew I wasn't waffling (that time)  ;D
Logged

PHPNews has been released!!! Download it now!!!
KenTeamBG
Jr. Member
**
Posts: 74


TeamBG rules!!!

WWW
Re:Save all...
« Reply #7 on: December 22, 2001, 06:10:43 PM »
Reply with quote

Quote from: Joseph Fung on December 22, 2001, 06:06:00 PMIt's easy as hell to do.  I thought about doing it - but when you have any decent number of boards - it's a huge number of fields being submitted in the form - which would slow down the save time for people on slow connections.

In the end I decided not to do it for to reasons
1: to keep the information submitted small
2: to keep it more y1g-like

Can you please tell me, Joseph, how you would do it?  Maybe one of us would like to make our own mod and its hard for me to tell if you think there is another way to do this other than what I described.  If there is, I am all ears and would like to try it and test it in MSIE4,5,5.5,6, NN4.x,4.5+,6, Opera and Lynx and see how well your method would work.
Logged

Big P
Mod Team
YaBB God
*****
Posts: 1462


"Back in '68, I don't like you, The End."

ICQ - 76064555pierceward@hotmail.com WWW
Re:Save all...
« Reply #8 on: December 22, 2001, 06:14:46 PM »
Reply with quote

Are you even familiar with Perl or PHP ken?
I would simply use the one file, and one big form. The form would give the data to the file (manageboards.php) and it would update everything.
One simple Form tag and your done.
The problem is is checks and updates all the fields, not just 3! So this could be bad on your board and server. Undertsand?  ???
Logged

PHPNews has been released!!! Download it now!!!
Joseph Fung
Global Moderator
YaBB God
*****
Posts: 4512


Keep smiling: it makes others nervous.

WWW
Re:Save all...
« Reply #9 on: December 22, 2001, 06:17:55 PM »
Reply with quote

Quote from: KenTeamBG on December 22, 2001, 06:10:43 PM
Quote from: Joseph Fung on December 22, 2001, 06:06:00 PMIt's easy as hell to do.  I thought about doing it - but when you have any decent number of boards - it's a huge number of fields being submitted in the form - which would slow down the save time for people on slow connections.

In the end I decided not to do it for to reasons
1: to keep the information submitted small
2: to keep it more y1g-like

Can you please tell me, Joseph, how you would do it?  Maybe one of us would like to make our own mod and its hard for me to tell if you think there is another way to do this other than what I described.  If there is, I am all ears and would like to try it and test it in MSIE4,5,5.5,6, NN4.x,4.5+,6, Opera and Lynx and see how well your method would work.

The easy way to do it is make it 1 form.

as each board has a unique ID number, you prefix each feild with the number, so instead of having

form
    field -> id value = 1
    field -> name
    field -> order
...
/form

form
    field -> id value = 2
    field -> name
    field -> order
...
/form

etc.


you have

form
    field -> 1_name
    field -> 1_order
    field -> submit button value=1
...
   field -> 2_ name
   field -> 2_order
   field -> submit button value=2

   field -> submit button value = 'all'
/form

and in the php script that receives it you do an
if submit==1
  only save the stuff for board 1
elseif submit == 2
  only save the stuff for board 2
elseif submit == 'all'
{
    save the stuff for every board.
}



it's really easy to grab the variables too because php has really kick-ass variable variable syntaxes, so you could do

foeach ($boardIDs as $bid)
{
    save ${"$bid_name"};
    save ${"$bid_order"};
   etc..
}


you understand?
Logged

Joseph Fung
Global Moderator
YaBB God
*****
Posts: 4512


Keep smiling: it makes others nervous.

WWW
Re:Save all...
« Reply #10 on: December 22, 2001, 06:19:31 PM »
Reply with quote

on a side-note: this method does not require "nested forms"  ::)
Logged

Big P
Mod Team
YaBB God
*****
Posts: 1462


"Back in '68, I don't like you, The End."

ICQ - 76064555pierceward@hotmail.com WWW
Re:Save all...
« Reply #11 on: December 22, 2001, 06:20:00 PM »
Reply with quote

or you could read that!  :o
Logged

PHPNews has been released!!! Download it now!!!
KenTeamBG
Jr. Member
**
Posts: 74


TeamBG rules!!!

WWW
Re:Save all...
« Reply #12 on: December 22, 2001, 06:25:27 PM »
Reply with quote

Yes, I am familiar with HTML, perl, C/C++, VB, VBS, JS, CSS and PHP...and more, shall I post my credentials or my job history?

Anyhoo...

This is my point.  If you want to always submit all fields, then yes, that's easy.  But if you want to be able to maintain the small form submit and not carry a large submit when only actually altering one field on one board field, then this would make no sense for performance issues.  And as I have been able to deduce, one of the main design considerations for YSE is fast upates/submissions.

I suppose a compromise would be to offer two flavors of "Edit Boards"...the current one and a new link in the admin panel...something like "Edit Many Boards at Once"...and have the large single form.

I think we are all on a similar page at least now.

« Last Edit: December 22, 2001, 06:26:35 PM by KenTeamBG » Logged

Big P
Mod Team
YaBB God
*****
Posts: 1462


"Back in '68, I don't like you, The End."

ICQ - 76064555pierceward@hotmail.com WWW
Re:Save all...
« Reply #13 on: December 22, 2001, 06:31:40 PM »
Reply with quote

I was asking if you were familiar with PHP because you didn't seem to understand what was being said. Joseph just proved how easy it would be, but no matter how often this is posted you dont seem to listen:
With one big form getting data for each file and saving all the files would be bad on the server. Slowing down, what was initially a fast forum.  ;)
Logged

PHPNews has been released!!! Download it now!!!
KenTeamBG
Jr. Member
**
Posts: 74


TeamBG rules!!!

WWW
Re:Save all...
« Reply #14 on: December 22, 2001, 06:37:07 PM »
Reply with quote

Yes I do get it and yes I am listening...my god, what is wrong with you people?

Nevermind, this is crazy...if you think processing the submit on the receiving PHP page is less time and work, then you are nuts.  Yes you can limit the SQL insert, but you still lose performance.  I can see there is a problem with intelligent discussions on this forum and that some people presume bug reporters and people with input, thoughts and ideas are ignorant...whatever.

 ::)
« Last Edit: December 22, 2001, 06:41:12 PM by KenTeamBG » Logged

Pages: [1] 2 Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Save all... « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.037 seconds with 20 queries.