|
|
|
| about a community thing | |
Posted: 01-20-2003 08:42 AM |
|
|
Shn |
R.I.P. |
|
|
Joined: 10 Feb 2002 |
Posts: 738 |
|
|
|
|
|
|
|
hello people !!
Yes.
Right. So. Where are you at with this whole community thingy ? Hmmm ? Come one don't be shy and tell me everything.
Now, i'm thinking of letting plastic use my site once it's finished (never) for his porn thing if he pays me well.
I was just wondering what i could add/change on it for it to be useable by normal people, which wasn't really what i had planned at the beginning...
and yet i spent so much time on it.
tickle me with your left mouse button !!
Every good advice will be rewarded with a kiss from oddduck. |
|
|
|
|
| | |
Posted: 01-20-2003 05:57 PM |
|
|
TuMTuM |
Will code HTML for food! |
|
|
Joined: 17 Feb 2002 |
Posts: 425 |
|
|
|
|
|
|
|
I am currently writing a nice stackbased parser wich enables us to store an array in a database wich is fully reversible to cut down parse times. It also makes sure that you for instance cant use [.b] tags in [.code] tags and stuff, it has error reporting, it auto closes tags does php highlighting and numbering and will soon have support for c++, java, html, etc highlighting. It features a limited scripting language and is uberfast. |
|
|
|
|
| | |
Posted: 01-20-2003 06:13 PM |
|
|
js995 |
Deletes your posts |
|
|
Joined: 10 Feb 2002 |
Posts: 226 |
|
|
|
|
|
|
|
having used your site, i say keep adding functionality on top, until you're happy (content?) you have all the functions you want/need/desire/hate. Then work through, refactoring and building a support framework for all of these pieces.
After this .. you should have a stable, mature system that is ready for widespread use.
[EDIT] oh yeah, and i think it'd be productive if you had access to the wiki we're using for planning, since you seem to have experience in this area[/EDIT] |
|
|
|
|
| | |
Posted: 01-21-2003 08:02 AM |
|
|
Shn |
R.I.P. |
|
|
Joined: 10 Feb 2002 |
Posts: 738 |
|
|
|
|
|
|
|
tumtum: yeah well, i've got no idea how to do whatever you're doing... I don't even know what parsing means.
js : i think i'll never be happy with what's on my site, as i always have new ideas to add/modify features... That's why i feel my site'll never be finished. Although, i did quite a few things to be able to just add functionalities (sp?) to my site, without having to change other stuff.
eg the comments and ratings system, the restricted access to some pages. Those can be very easily used by newly added parts. Imagine i create a new page that'll have a restricted access, i'll just have to modify something in the db. For comments and ratings, it's even easier, as i don't have to modify anything. I just have to create my thing, and there, magic, i can allow users to rate/comment it. I'm so proud of myself
I've still got a lot of work to do, there are still many things i'm working on... but i need ideas for other stuff that might interest me more than what i'm currently doing.
Now, pardon my ignorance, but what's a wiki ?
And what do you mean by "you seem to have experience in this area" ? what area are you talking about ?
ALRIGHT, if anybody's interested in some source code, i'm willing to share some parts of my site, and explaining how and why i programmed them this way.
Of course, i won't share if it's for people who wish to make a commercial site or just steal my ideas without learning from them.
Ok, now i need more free time to learn more php, more mysql, more photoshop, while i continue learning coldfusion at work...
Damnit, i feel like i never have enough time to learn whatever interests me.
[edit #1]
oooh, i just talked with my boss and he might be able to buy books for me, using the company's budget
hehe, i'm not well paid, but i'm getting stuff for free, so it's great !
[/edit #1]
[edit #2]
another thing i made and that can be easily used for anything else (at least on my site) is the page numbering system.
You'll notice that it's used on almost all pages, and that it still works when users sort stuff. I'm so proud of this one too
Although i admit i stole the idea of the numbers' syntax...
you can find the original thing that i copied (although i had to find out the algorithm) from at http://www.bsplay.com/skins.php?sortBy=date&sortAD=DESC&type=a&showNr=4&showFrom=40&sort=Sort (try finding out the algorithm yourself, it's fun).
Now that's not some code i'd share with just anybody just like that...
[/edit #2] |
|
|
|
|
| | |
Posted: 01-21-2003 09:24 AM |
|
|
TuMTuM |
Will code HTML for food! |
|
|
Joined: 17 Feb 2002 |
Posts: 425 |
|
|
|
|
|
|
|
Quote: |
another thing i made and that can be easily used for anything else (at least on my site) is the page numbering system.
You'll notice that it's used on almost all pages, and that it still works when users sort stuff. I'm so proud of this one too
Although i admit i stole the idea of the numbers' syntax...
you can find the original thing that i copied (although i had to find out the algorithm) from at http://www.bsplay.com/skins.php?sortBy=date&sortAD=DESC&type=a&showNr=4&showFrom=40&sort=Sort (try finding out the algorithm yourself, it's fun).
Now that's not some code i'd share with just anybody just like that...
|
Uhm.. you take the number of items in total, divide it by the number of items per page and you have the number of pages. The make queries with limits (eg LIMIT 5, 5 shows the 5 items from item 5) and you have all of it? |
|
|
|
|
| | |
Posted: 01-21-2003 09:33 AM |
|
|
js995 |
Deletes your posts |
|
|
Joined: 10 Feb 2002 |
Posts: 226 |
|
|
|
|
|
|
|
Quote: |
Originally posted by Shn
js : i think i'll never be happy with what's on my site, as [B]i always have new ideas to add/modify features... |
lucky you... i wish i had lots of decent ideas, regularly |
|
|
|
|
Posted: 01-21-2003 09:39 AM |
|
|
Shn |
R.I.P. |
|
|
Joined: 10 Feb 2002 |
Posts: 738 |
|
|
|
|
|
|
|
TuMTuM wrote: |
Uhm.. you take the number of items in total, divide it by the number of items per page and you have the number of pages. The make queries with limits (eg LIMIT 5, 5 shows the 5 items from item 5) and you have all of it? |
yeah but i was mainly talking about the numbers syntax thingy. It's fun to find out how to make it work. |
|
|
|
|
| | |
Posted: 01-21-2003 10:42 AM |
|
|
TuMTuM |
Will code HTML for food! |
|
|
Joined: 17 Feb 2002 |
Posts: 425 |
|
|
|
|
|
|
|
Well, its easier to write stuff if you spend lots of time coding . For instance I can start writing something without really having to stop and think of how I should implent something.
Btw, here is some source code for my stackbased parser:
Code: |
function generateTree()
{
if(!isset($this->_rawcode))
{
die();
}
else
{
// this is protection to make sure posts that start with a tag get parsed properly
$this->_tree = array('content' => array(), 'type' => array(), 'arguments' => array());
define('END_ELEMENT', ']');
define('START_ELEMENT', '[');
define('START_TAG', 0);
define('END_TAG', 1);
define('CONTENT', 2);
define('VARIABLE', 3);
define('ACTION', 4);
$this->_rawcode = $this->preParse($this->_rawcode);
$is_element = false;
$tok = strtok($this->_rawcode, START_ELEMENT);
while(!($tok === false))
{
if($is_element == false)
{
$this->_tree['content'][] = $tok;
$this->_tree['type'][] = CONTENT;
$this->_tree['argument'][] = null;
$tok = strtok(END_ELEMENT);
$is_element = true;
}
else
{
if(ereg('^/', $tok))
{
$this->_tree['type'][] = END_TAG;
$this->_tree['content'][] = $tok;
$this->_tree['argument'][] = null;
}
elseif(ereg('^%', $tok))
{
$this->_tree['type'][] = VARIABLE;
$this->_tree['content'][] = $tok;
$this->_tree['argument'][] = null;
}
elseif(ereg('^!', $tok))
{
$this->_tree['type'][] = ACTION;
$this->_tree['content'][] = $tok;
$this->_tree['argument'][] = null;
}
else
{
$this->_tree['type'][] = START_TAG;
if(ereg('=', $tok))
{
$tok = str_replace('=', ' ', $tok);
$array = explode(' ', $tok);
$this->_tree['content'][] = $array[0];
$count = count($this->_tree['argument']);
foreach($array as $id => $argument)
{
$this->_tree['argument'][$count][$id] = $argument;
}
}
else
{
$this->_tree['content'][] = $tok;
$this->_tree['argument'][] = null;
}
}
$tok = strtok(START_ELEMENT);
$is_element = false;
}
}
}
}
|
Its hard to explain what it does, but I'll try anyway. The code reads a string from the class, then it detects [tags] and everytime it finds something starting with a [ and ending with a ] it makes a new entry in the array. An array could look like this:
Code: |
Array
(
[content] => Array
(
[0] =>
[1] => code
[2] =>
[3] => b
[4] => unclosed bold tag
[5] => /code
[6] =>
)
[type] => Array
(
[0] => 2
[1] => 0
[2] => 2
[3] => 0
[4] => 2
[5] => 1
[6] => 2
)
[argument] => Array
(
[0] =>
[1] =>
[2] =>
[3] =>
[4] =>
[5] =>
[6] =>
)
)
|
The argument array is empty atm, but it would normally look like this:
Code: |
[0] => Array
(
[0] => img
[1] => [url]http://www.host.com/image.jpg[/url]
[2] => width
[3] => 640
[4] => height
[5] => 480
)
|
Because regular expressions are slow I only use them with preparsing. Above array is serialized and stored in an array (that array is preparsed). The parsing from the array is pretty fast up to 100 posts, if you go higher then that, then you are better of using regular expressions.
[edit]
This is why I hate regular expressions by the way:
Code: |
[b]This should NOT be bold[/b]
[code]
<?php /* [b][code]this will prolly look weird[/code][/b] */ ?>
[/code]
|
|
|
|
|
|
| | |
Posted: 01-21-2003 01:27 PM |
|
|
Shn |
R.I.P. |
|
|
Joined: 10 Feb 2002 |
Posts: 738 |
|
|
|
|
|
|
|
Quote: |
Now, pardon my ignorance, but what's a wiki ?
And what do you mean by "you seem to have experience in this area" ? what area are you talking about ? |
thx for answering js.
:p
:D
...
:|
(please ?) |
|
|
|
|
Posted: 01-21-2003 01:38 PM |
|
|
js995 |
Deletes your posts |
|
|
Joined: 10 Feb 2002 |
Posts: 226 |
|
|
|
|
|
|
|
what i mean by experience is that you have practical experience of making things that do similar tasks to what we're up to (i think). This is useful information, and is of value to think up solutions that work better, before starting to code things.
i.e if you've done X, and found that it works better doing it way Y .. any new project from the "wiki" (knowledgebase) can use that information, without having to do X and discover Y for themselves. (obvious, i know)
also im working on putting a guest htaccess on the wiki, so info on that should be coming soon.
js |
|
|
|
|
Mindcontroll Forum Index » Programs/Programming Development |
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You can vote in polls in this forum
|
All times are GMT - 5 Hours
Page 1 of 1
|
|
|
|
|