Home
Help
Search
Calendar
Login
Register
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
New forum theme up and running!
Charas-Project
»
Off-Topic
»
Archive
»
Really Old Stuff
»
PHP
(Moderator:
De KoFfieŠ
) »
Multiverse Oneliner creation
« previous
next »
Print
Pages: [
1
]
Author
Topic: Multiverse Oneliner creation (Read 21181 times)
Alex
I am the MASTER!
Administrator
Exemplar
Posts: 1,130
Multiverse Oneliner creation
«
on:
July 30, 2003, 05:09:06 PM »
We began talking about this
here
.
And so, time to make it fun and useful!!!!
So, i begin with some notes:
where you have:
$content
=
str_replace
(
"\\"
,
"\"
,
$content
);
$content
=
str_replace
(
"<"
,
"<"
,
$content
);
$content
=
str_replace
(
">"
,
">"
,
$content
);
there is some nice funcions to do this better with
this function
.
Just do this:
$content
=
htmlentities
(
$content
);
And all html troubles will be avoided forever!
Oh, and add the ";" at te end of line 60
After this, what can be done?
Simple, a multifile version!
Example imaging we have oneliner.txt and oneliner2.txt
Just define an index file (ex: index.txt) with a "filename space description" for each line.
So, simply
oneliner
.
txt You know your crazy in the Charas project when
...
oneliner2
.
txt You know your bored in the Charas project when
...
This tells you something?
Yes, each line contains the $openfile and $onelinetitle vars.
So, in the main php file, you kust need to specify the index file name.
Then, check if $openfile and $onelinetitle exists:
If yes, then use the $openfile and $onelinetitle you have as you did now.
It not, show the available $openfile reading them from the index:
Just read each rows and split it using the first space as reference.
Then, you'll have a 2 indexes array:
$yourarray[0] as $openfile
$yourarray[0] as $onelinetitle
So it's easy to create a select box or a list of hrefs to recall your script passing to it also these vars.
And so, the choosen file will be viewed
Ok, this are just base steps. But after this, you can add an "index.txt" editor to add new files and other useful stuffs.
Let me know what you think, and if you'd like to try creating this!
Logged
GaryCXJk
<strong>Official Charas.EX Team Member</strong>
Exemplar
Posts: 1,586
FOUR OH FOUR'D
(No subject)
«
Reply #1 on:
July 30, 2003, 07:29:31 PM »
Aha...
For some reason, this makes sense to me. Hell, why didn't I think about it? Also, I have an idea for an admin page. BUT it isn't really hacker proof. Actually, it can be. Meh, I'll just start with the multifile thingy.
THIS IS FUN!!!
EDIT:
I've thought of something more challenging. What if I added something like list or nonlist?
And they need to be seperated by a special command, like ||BUYAKA|| or something... I think I stick to ||
Logged
Play it now!
Charas Breakout DX
Area91: for MUGEN and RPG Maker VX Ace stuff
Alex
I am the MASTER!
Administrator
Exemplar
Posts: 1,130
(No subject)
«
Reply #2 on:
July 30, 2003, 08:01:15 PM »
Well, now i think you've enough material and ideas to try.
If you want some more proof, then you should think on placing arrays indexes within the txt file. This will make you simple to eventually add new "fields" on it.
Namely, a text file with index in it is called "text database".
But better to proceed step by step: i think that to realize what i told before and the index admin panel is ok, right now.
You know: better less WORKING things that tons of bugged ones
Just one addon: txt files now means new "discussions".
So the ability of creating new files should be given to everyone (simply a "create new discussion" link).
And so, a password protected mod panel is a must, to eventually delete unuseful files and comments...
And deleting one line in the middle of a text file, making all the other to come "up one line" is not that easy...
Logged
GaryCXJk
<strong>Official Charas.EX Team Member</strong>
Exemplar
Posts: 1,586
FOUR OH FOUR'D
(No subject)
«
Reply #3 on:
July 31, 2003, 07:11:58 AM »
Well, before I had the chance to read this, I already made version 1.2!!! Anyways, I'll try to make that. Wouldn't be that hard tho.
Logged
Play it now!
Charas Breakout DX
Area91: for MUGEN and RPG Maker VX Ace stuff
Alex
I am the MASTER!
Administrator
Exemplar
Posts: 1,130
(No subject)
«
Reply #4 on:
July 31, 2003, 10:25:10 AM »
Not bad!
It's surely just a beta, but ok to work on.
Now i'll wait for the next version
Logged
GaryCXJk
<strong>Official Charas.EX Team Member</strong>
Exemplar
Posts: 1,586
FOUR OH FOUR'D
(No subject)
«
Reply #5 on:
July 31, 2003, 10:51:48 PM »
This is the most badass creation I've ever made... for now. Anyways, here it is.
Also made put up an example for the people who actually think: "What the hell are they talking about?"
http://members.lycos.nl/garycxjk/mvtest/index.php
I actually need bugcheckers. So if you find a bug, please tell me.
Ow, and Alex, change this forum so that the / me tag only works at the beginning of the line. It's annoying if the url is members.lycos.nl.
Example is above.
http://members.lycos.nl/garycxjk/mvtest/index.php
EDIT2:
Found bug!!!
It seems you'll have to post first before you can see the entries.
Logged
Play it now!
Charas Breakout DX
Area91: for MUGEN and RPG Maker VX Ace stuff
GaryCXJk
<strong>Official Charas.EX Team Member</strong>
Exemplar
Posts: 1,586
FOUR OH FOUR'D
(No subject)
«
Reply #6 on:
August 01, 2003, 03:48:06 PM »
I fixed it, so here's version 1.3.1
Logged
Play it now!
Charas Breakout DX
Area91: for MUGEN and RPG Maker VX Ace stuff
GaryCXJk
<strong>Official Charas.EX Team Member</strong>
Exemplar
Posts: 1,586
FOUR OH FOUR'D
(No subject)
«
Reply #7 on:
August 03, 2003, 01:39:51 PM »
And I've added a forbidden words system, so here's version 1.3.2!
Next step: MySQL!!!
Logged
Play it now!
Charas Breakout DX
Area91: for MUGEN and RPG Maker VX Ace stuff
Alex
I am the MASTER!
Administrator
Exemplar
Posts: 1,130
(No subject)
«
Reply #8 on:
August 03, 2003, 01:48:16 PM »
I gave a look at it fastly. Will se more deep what i'll find more time
Anyhow, i have 2 fast notes:
1)
list($strid,$sopenfile,$slisted,$stitle) = split(" ~ ",$filearray[$x]);
This is dangerous. What will happens if someone use ~ as a character in the name of the board?
Simple solution: when creating, do a replce for ~ to something else (- should be ok).
You have to be sure that your splitting char will be ONLY present as a splitting char
2)
In the admin page, just for look: better to place the three buttons aligned under the input fields. You'll use less space and make it more readable.
Logged
Alex
I am the MASTER!
Administrator
Exemplar
Posts: 1,130
(No subject)
«
Reply #9 on:
August 03, 2003, 02:22:34 PM »
But not for the "Create your own oneliner file!" part.
There is no control for that.
And so, just try to enter "test ~ bissss".
And the index.txt file reports:
oneliner ~ oneliner.txt ~ listed ~ Oneliners are fun, because:
movies ~ movies.txt ~ nonlisted ~ Movie quotes
guest2 ~ guest2.txt ~ listed ~ test ~ bissss
This is what i was talking about: now i have a new board named just "test", not "test ~ bissss".
Logged
GaryCXJk
<strong>Official Charas.EX Team Member</strong>
Exemplar
Posts: 1,586
FOUR OH FOUR'D
(No subject)
«
Reply #10 on:
August 03, 2003, 07:41:33 PM »
Fixed.
Logged
Play it now!
Charas Breakout DX
Area91: for MUGEN and RPG Maker VX Ace stuff
Print
Pages: [
1
]
« previous
next »
Charas-Project
»
Off-Topic
»
Archive
»
Really Old Stuff
»
PHP
(Moderator:
De KoFfieŠ
) »
Multiverse Oneliner creation