Page 3 of 8

Posted: Wed Apr 11, 2007 2:23 am
by Kieran Huggins
now I'm hungry for popcorn... :-( Let the flogging begin! (and some lashing, just in case)

Posted: Wed Apr 11, 2007 7:42 am
by feyd
Okay, enough ribbing.

Posted: Wed Apr 11, 2007 3:19 pm
by ziggy3000
aaronhall wrote: Also, I know a few here already apologized, but I wanted to say sorry myself for all of the code we didn't write for you, and for not going above and beyond to spoon-feed you answers. As many of the people in this community have spent years learning the language themselves, I speak for all of us what I say that we regret not jumping all over the opportunity fix your problems without anything in return, and not going out of our way to make sure you learn absolutely nothing. How harebrained of us to think that you should be expected to try things for yourself; how selfish of us to have expected you to utilize resources that are already freely available on the internet. Please accept our heartfelt and sincere apologies.
it's okay. i understand your just trying to help, but i do expect someone to be really helpful and post some code once in a while...

and i don't need pear just yet... i am going to get another pc, and triple boot Ubuntu, vista and xp, so if it doesn't work on windows, ill try Ubuntu.

Posted: Wed Apr 11, 2007 4:51 pm
by ziggy3000
ok i dont know how to implement my highlight function into the cbparser

heres the code

Code: Select all

<?php
	/*
		syntax highlighting (Cool Colored Codeā„¢)
		och, why not!
		*/
	$ccc = array(); $i = 0;
	while ($ccc_str = stristr($bb2html, '[ccc]')) {
		$ccc_str = substr($ccc_str, 0, strpos($ccc_str, '[/ccc]') + 6);
		$bb2html = str_replace($ccc_str, "***ccc_string***$i", $bb2html);
		$ccc[$i] = str_replace("\r\n", "\n", $ccc_str);
		$i++;
	}
?>
first of all i want it

Code: Select all

 not [ccc][/ccc]
i just replaced all ccc's with php but then i  am confused on using my function instead of the one thats included

heres the code i want replaces with

[b]Edited: I Solved it. Dont need help anymore.[/b]

Posted: Thu Apr 12, 2007 3:49 pm
by ziggy3000
Everah, can you help me?
or anyone else that knows how to please help

Posted: Thu Apr 12, 2007 4:29 pm
by RobertGonzalez
I am working on a corz blog bbcode parser fork at the moment. It works, but it is really rough.

Posted: Thu Apr 12, 2007 4:31 pm
by ziggy3000
anyone else???
it's not like that everah is the only smart one here
is it?

Posted: Thu Apr 12, 2007 4:39 pm
by RobertGonzalez
Yeah, there has got to be someone else smarter than me around here that can do this for ziggy. :roll:

Posted: Thu Apr 12, 2007 5:12 pm
by ziggy3000
guess everah is the smartest one here :roll:

Posted: Thu Apr 12, 2007 5:18 pm
by aaronhall
ziggy3000 wrote:guess everah is the smartest one here :roll:
You're awfully sassy for a guy that needs help so desparately :) I don't think that's what he meant anyway.

Posted: Thu Apr 12, 2007 5:20 pm
by ziggy3000
i just want to get it to work, since i am trying to code other stuff(it's coming along very well) and i need to replace the functions so i can use this too

Posted: Thu Apr 12, 2007 7:26 pm
by RobertGonzalez
I am taking this down by Sunday night because it is really not ready for production use yet. But since your problem is so urgent and you need this like yesterday, have at it. I make no warranties about its usability. It worked in local testing on PHP 5 on Apache 2.2 on Windows XP. Please do not ask for support as I am still making it work at the moment.

Posted: Fri Apr 13, 2007 3:41 pm
by ziggy3000
thanks everah it's awesome! :D
but if i want to use my highlight function, instead of the pear
so if i replace T_CONSTANTS.php and PHP_highlight.php with my func.php and replace some parts of parser-test.php needed to use my func, would it work?


I am taking this down by Sunday night because it is really not ready for production use yet.
do you have any idea when it will be?

Edited: Never Mind. I got it to work :D

Posted: Fri Apr 13, 2007 4:25 pm
by RobertGonzalez
I'm glad you got it. Keep in mind that I was toying with different things in it, like the links to the PHP functions and such. To disable/enable certain things you will need to edit the core code.

Posted: Fri Apr 13, 2007 9:57 pm
by ziggy3000
do you have a ten line or less code that replaces [b][/b] with <b></b>
the one in cbparser is kinda long, and i like to keep my code short

i added more buttons for url, image, and php code, but it doesn't parse the tags
it parses everything between the <?php and ?> tags in the textfield that you input

the only files i am using are parser-test.php and func.php(my highlight function) so i dont really have a core...
the test page was a little javascript and html and some php
func.php is a function named hc()