NineChime forum

Furry stuff, oekaki stuff, and other stuff.

You are not logged in.

Post a reply

Write your message and submit
Options
Humanity test

What is five + one?

Go back

Topic review (newest first)

rainbow
06-24-2006 17:03:46

Pinkie Pichu wrote:

My oekaki boards are located at http://pokeden.com/pwo/

If you'd let me, I'd love to see how you've coded up your timer thing. If you could send your index.php perhaps to my e-mail at diana.rulez@googlemail.com ? I'd gladly add a line of credit as well as a link in the footer of my oekakis.

Okay. I'll e-mail it to you as soon as possible. ^.^

Waccoon
06-24-2006 16:54:12

Missing dollar sign and semicolon:

$langop_word_hours = $hours;

<a href=\"'.nifty2_nice_url('\\1').'\"'.nifty2_url_target('\\1').'>[link]</a>

Correct.  When performing a regular expression (the search engine used for matching, also known as "regex"), the engine keeps track of how many matches were made, and enumerates them so you can use them.  This allows you to use regex for search + repeat/replace, rather than just finding matches. 

Using "\x" allows you to repeat each match (doulble backslashes are required because the backslash is a special escape character).  I forget exactly what is being stored in the numbers, though obviously, "1" stores the link, and "2" stores the name.

The locking feature seems to be the most difficult to do. E.g. whe ndoes WP lock it for user2 whe nuser 1 wants to edit? I was thinking of some manual thing, so that the "master" user controls the locking feature, and is unable to re-touch until lock is on for user2.

I find locking to be pretty useless unless you have a timer to automatically unlock the image within a certain amount of time (a few hours, for example).  You can't rely on people to unlock images if they close the canvas and don't post their edits, or if their browser crashes.  OekakiPoteto wasn't really designed for this kind of stuff, so implementing a feature such as this will drive you crazy.  I know.

My recommendation is to save a UNIX timestamp and username in the lock field you've created (use "time()" to do this), and if someone else tries to edit the picture within 10,000 seconds, a warning will be printed that the image is being edited by "name saved in database."  That's still troublesome, but good enough to prevent people from stepping on each other's toes, and doesn't actually "lock" the image, so if someone tries to edit a picture, and their browser crashes, they don't have to wait for the image to be unlocked.  I find the honor system works very well, really.

Pinkie Pichu
06-24-2006 07:42:47

My oekaki boards are located at http://pokeden.com/pwo/

If you'd let me, I'd love to see how you've coded up your timer thing. If you could send your index.php perhaps to my e-mail at diana.rulez@googlemail.com ? I'd gladly add a line of credit as well as a link in the footer of my oekakis.

rainbow
06-23-2006 17:45:11

Pinkie wrote:

======================
Problem 1
======================


Well, I'm currently trying out to display the time in hours and mins, as opposed to just minutes. I'm also trying to learn PHP at the same time, so I guess I was just testing out things :3

Here is what I wish to replace the original code with:

Code:

        // Time       **************************** Pinkie's time in hours and min *****************************
        $editsec = $outerrow['edittime'];
        if ($editsec<20) {
            echo $langop_word_unknown."\n";
        } 
        elseif ($editsec>3600) {
            $langop_word_hours = hours
            $pinkie_hours = (ceil($editsec / 3600));
            $pinkie_mins = (ceil($editsec - ($pinkie_hours * 3600)));
                echo $pinkie_hours.' '. $langop_word_hours.' and '. $pinkie_mins .' '.$langop_word_minutes."\n";    
        }
        else {
            echo (ceil($editsec / 60)).' '.$langop_word_minutes."\n";
        }
        // ********************************** End Pinkie's time **************************************

but I get parsing errors. What's wrong wth it? I bet it's something simple.


======================
Problem 2
======================

Instead of outputting the whole link name, I want to display [link]

I've looked at the niftytoo.php file, and found this:

Code:

// URLS
    nifty2_replace($out, 'url', "'<a href=\"'.nifty2_nice_url('\\1').'\"'.nifty2_url_target('\\1').'>\\2</a>'", $mode, 'me', '[^]"]+');
    nifty2_replace($out, 'url', "'<a href=\"'.nifty2_nice_url('\\1').'\"'.nifty2_url_target('\\1').'>\\1</a>'", $mode, 'me');

I don't understand the coding very well. I have no idea where //2 and //1 comes from. Where would I edit?
Whould I change:

<a href=\"'.nifty2_nice_url('\\1').'\"'.nifty2_url_target('\\1').'>\\2</a>

to

<a href=\"'.nifty2_nice_url('\\1').'\"'.nifty2_url_target('\\1').'>[link]</a>

and do the same for the 2nd URL thing?


======================
Problem 3
======================

Also, I'm trying to code up a collab script for WP 5.9.9. So far I've got it where a user is able to choose a member upon submitting a pic, and that member is added into a field in the _dta table. I've also tried to set up a lockign feature. I am able to code it up so that if the lock is off (is able to edit = 1) for user1, the [re-touch] link appears, and if not (is able to edit = 0), it doesn't appear. Same goes for user2. I've got it so that both users are able to re-touch in PaintBBS, and I presume it'll be easy to do the same for the other applets.

The locking feature seems to be the most difficult to do. E.g. whe ndoes WP lock it for user2 whe nuser 1 wants to edit? I was thinking of some manual thing, so that the "master" user controls the locking feature, and is unable to re-touch until lock is on for user2.

Any ideas on what I can do? I'm looking to challenge myself since that how I've always learnt scrippting / programming languages. I don't think I want to be fiddling about with passwords like you've done to be honest. However, it may be difficult with the method that I'm doing if it requires more than 2 users on a picture.


Anyway, just so you know, I've set up a bunch of oekaki boards for my friends, and each time I've reccomended one of your oekaki boards. :3

I hope you can answer my questions.

Love ya
~ pinkie

P.S, the code / preformatted text doesn't work in WP.

Can I have a link to your oekaki?

I have mine parsed in weeks (w), days (d), hours (h), minutes (m) and seconds (s).

If you want a sample copy of my index.php file (or part of it), please let me know.

Pinkie
06-23-2006 15:22:24

======================
Problem 1
======================


Well, I'm currently trying out to display the time in hours and mins, as opposed to just minutes. I'm also trying to learn PHP at the same time, so I guess I was just testing out things :3

Here is what I wish to replace the original code with:

Code:

        // Time       **************************** Pinkie's time in hours and min *****************************
        $editsec = $outerrow['edittime'];
        if ($editsec<20) {
            echo $langop_word_unknown."\n";
        } 
        elseif ($editsec>3600) {
            $langop_word_hours = hours
            $pinkie_hours = (ceil($editsec / 3600));
            $pinkie_mins = (ceil($editsec - ($pinkie_hours * 3600)));
                echo $pinkie_hours.' '. $langop_word_hours.' and '. $pinkie_mins .' '.$langop_word_minutes."\n";    
        }
        else {
            echo (ceil($editsec / 60)).' '.$langop_word_minutes."\n";
        }
        // ********************************** End Pinkie's time **************************************

but I get parsing errors. What's wrong wth it? I bet it's something simple.


======================
Problem 2
======================

Instead of outputting the whole link name, I want to display [link]

I've looked at the niftytoo.php file, and found this:

Code:

// URLS
    nifty2_replace($out, 'url', "'<a href=\"'.nifty2_nice_url('\\1').'\"'.nifty2_url_target('\\1').'>\\2</a>'", $mode, 'me', '[^]"]+');
    nifty2_replace($out, 'url', "'<a href=\"'.nifty2_nice_url('\\1').'\"'.nifty2_url_target('\\1').'>\\1</a>'", $mode, 'me');

I don't understand the coding very well. I have no idea where //2 and //1 comes from. Where would I edit?
Whould I change:

<a href=\"'.nifty2_nice_url('\\1').'\"'.nifty2_url_target('\\1').'>\\2</a>

to

<a href=\"'.nifty2_nice_url('\\1').'\"'.nifty2_url_target('\\1').'>[link]</a>

and do the same for the 2nd URL thing?


======================
Problem 3
======================

Also, I'm trying to code up a collab script for WP 5.9.9. So far I've got it where a user is able to choose a member upon submitting a pic, and that member is added into a field in the _dta table. I've also tried to set up a lockign feature. I am able to code it up so that if the lock is off (is able to edit = 1) for user1, the [re-touch] link appears, and if not (is able to edit = 0), it doesn't appear. Same goes for user2. I've got it so that both users are able to re-touch in PaintBBS, and I presume it'll be easy to do the same for the other applets.

The locking feature seems to be the most difficult to do. E.g. whe ndoes WP lock it for user2 whe nuser 1 wants to edit? I was thinking of some manual thing, so that the "master" user controls the locking feature, and is unable to re-touch until lock is on for user2.

Any ideas on what I can do? I'm looking to challenge myself since that how I've always learnt scrippting / programming languages. I don't think I want to be fiddling about with passwords like you've done to be honest. However, it may be difficult with the method that I'm doing if it requires more than 2 users on a picture.


Anyway, just so you know, I've set up a bunch of oekaki boards for my friends, and each time I've reccomended one of your oekaki boards. :3

I hope you can answer my questions.

Love ya
~ pinkie

P.S, the code / preformatted text doesn't work in WP.

Board footer

Yep, still running PunBB
© Copyright 2002–2008 PunBB