Re: [PHP] Static utility class?

2013-09-05 Thread Micky Hulse
On Thu, Sep 5, 2013 at 12:15 PM, Robert Cummings wrote: > Probably sufficient (and easier for typing) to just call it Utility since it > follows the pattern but isn't the pattern itself :) Good call! Updated the example code. Thanks again! I really appreciate the help. :) Cheers, Micky -- PHP

Re: [PHP] Static utility class?

2013-09-05 Thread Micky Hulse
On Wed, Sep 4, 2013 at 11:07 PM, Robert Cummings wrote: > I'll second Rodrigo's opinion, but would like to comment that the name of > the class is misleading since it's called "Singleton". The singleton pattern > is used when you only ever want one instantiation of a class. In your case > you are

Re: [PHP] Static utility class?

2013-09-04 Thread Micky Hulse
Hi Rodrigo, thanks for the help, I really appreciate it! On Wed, Sep 4, 2013 at 5:55 PM, Rodrigo Santos wrote: > Hi, first, sorry for the bad English. Not bad at all! Very clear and well written reply (heck, it's better than my native English writing), so thank you! :) > Yes, at least, as far a

Re: [PHP] Static utility class?

2013-09-04 Thread Micky Hulse
Thanks Stephen! I really appreciate the help! :) In my PHP ventures over the years, I haven't made much use of static variables/methods/properties ... I was thinking they might be useful for this one bit of code, but based on your feedback (and David's) I think I'll be heading down a different pat

Re: [PHP] Static utility class?

2013-09-04 Thread Micky Hulse
Thank you so much for the quick and very informative/educational replies Stephen and David, I really appreciate it! :) On Wed, Sep 4, 2013 at 12:36 PM, Stephen wrote: > This sounds simply like a library of functions that are implemented using > objects. > Instantiate your static variables in the

[PHP] Static utility class?

2013-09-04 Thread Micky Hulse
Hi all! Example code: Goal: I want to have a "utility" class that contain utility methods which should have the option of being called multiple times on a page. I think my main goal is to avoid having to "new" things ... I don't really need to create an

Re: [PHP] Re: PHP5 OOP: Abstract classes, multiple inheritance and constructors

2013-06-21 Thread Micky Hulse
Thanks for tips David! I'll play with your suggestion. I've never used abstract methods, but if I'm understanding the code you posted, they look pretty useful. I may be back with questions. Appreciate the help. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://

[PHP] Re: PHP5 OOP: Abstract classes, multiple inheritance and constructors

2013-06-21 Thread Micky Hulse
On Fri, Jun 21, 2013 at 12:54 PM, Micky Hulse wrote: > 2. Is there a way for me to pass $foo to the parent class, from the > child, without having to ferry that variable through the abstract > class? I should mention, I'm working on some code where I don't have the ability to

[PHP] PHP5 OOP: Abstract classes, multiple inheritance and constructors

2013-06-21 Thread Micky Hulse
Example/working code here: Couple questions: 1. Is there anything wrong with the way I'm using the abstract class? If so, how could I improve the logic/setup? 2. Is there a way for me to pass $foo to the parent class, from the child, without having to fe

Re: [PHP] LightBox click detection

2013-06-16 Thread Micky Hulse
On Fri, Jun 14, 2013 at 8:52 AM, Tedd Sperling wrote: > Here's the problem -- I need to count the number of times a user activates a > LightBox -- how do you do that? If you're using Google Analytics, you can use click tracking:

Re: [PHP]

2013-04-18 Thread Micky Hulse
On Thu, Apr 18, 2013 at 8:36 AM, Larry Martell wrote: > That was it. Thanks!! Np. Glad it helped. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP]

2013-04-17 Thread Micky Hulse
Ah, I see now. Sorry, I must have read the original question wrong. There's a good thread on stack about short tags: "Are PHP short tags acceptable to use?" Which kinda links to the docs: "PHP tags"

Re: [PHP]

2013-04-17 Thread Micky Hulse
On Wed, Apr 17, 2013 at 3:59 PM, Micky Hulse wrote: > You might need to turn on the short tag option > in your conf file. Sorry, ini file, not conf. Been a long day. :D I guess I should have asked if short tags are turned on for your 5.3.3? -- PHP General Mailing List (http://www.php.ne

Re: [PHP]

2013-04-17 Thread Micky Hulse
It should still work. You might need to turn on the short tag option in your conf file. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] load rtf file

2012-09-03 Thread Micky Hulse
On Mon, Sep 3, 2012 at 3:52 PM, Tedd Sperling wrote: > Maybe if I was on a Windoze machine, but I'm on a Mac. What about TextEdit.app? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] curl equivalent in PHP

2012-03-02 Thread Micky Hulse
Hello, On Fri, Mar 2, 2012 at 8:07 AM, Jim Lucas wrote: >> But on some of my servers, curl isn't enabled! Is there any equivalent >> code >> to  achieve the same? I've used a combination of output buffering [1], readfile() [2] and caching (specific to the framework I was using). Simply, you cou

Re: [PHP] Insert new array after specific key in multidimensional array

2012-02-28 Thread Micky Hulse
Hi Adam! On Tue, Feb 28, 2012 at 2:05 PM, Adam Richardson wrote: >> What would be the best way to insert $o_insert array into $o array >> after specified key? Great question. :D Quick answer: It's a Wordpress thang! Long answer: I am working with WordPress and the theme that I am using stores

[PHP] Re: Insert new array after specific key in multidimensional array

2012-02-28 Thread Micky Hulse
On Tue, Feb 28, 2012 at 8:36 AM, Shawn McKenzie wrote: > Might be an easier way but this should work.  You can sort the $before = > true out for yourself :-) Hi Shawn, I've updated your function to do the $before bit: I also set it up to m

Re: [PHP] Insert new array after specific key in multidimensional array

2012-02-27 Thread Micky Hulse
Hi Xucheng, On Mon, Feb 27, 2012 at 7:41 PM, xucheng wrote: > Maybe you can trans the array into a xml tree , then modify its leaves . Now that sounds like an interesting idea... I will have to research that as an option. Thanks for tip! :) @Eray, I was not able to get your code to work on my

Re: [PHP] Insert new array after specific key in multidimensional array

2012-02-27 Thread Micky Hulse
Thank you Eray! That's a cool approach. Testing code now. I will be back with my results. :) Thank you!!! Cheers, M -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Insert new array after specific key in multidimensional array

2012-02-27 Thread Micky Hulse
Howdy! Example code: What would be the best way to insert $o_insert array into $o array after specified key? I hate to just ask for example code, but I can't seem to find the perfect solution. :( Many thanks in advance for the help! Cheers, Micky -- PHP Gen

Re: [PHP] Arrays: Comma at end?

2012-02-08 Thread Micky Hulse
On Wed, Feb 8, 2012 at 10:08 AM, Robert Cummings wrote: > JavaScript in Internet Crapsplorer spanks you on the bottom every time you > have a trailing comma in a JS array. That may be where you picked up the > aversion. On Wed, Feb 8, 2012 at 10:10 AM, Micky Hulse wrote: > I am ju

Re: [PHP] Arrays: Comma at end?

2012-02-08 Thread Micky Hulse
On Wed, Feb 8, 2012 at 9:58 AM, Larry Garfield wrote: > Drupal's coding standards encourage the extra trailing comma on multi-line > arrays, for all the readability and editability benefits that others have > mentioned.  We have for years.  Cool stuff. :-) Yah, I love that syntax guideline/rule i

Re: [PHP] Arrays: Comma at end?

2012-02-07 Thread Micky Hulse
On Tue, Feb 7, 2012 at 12:32 PM, Ashley Sheridan wrote: > That's because it's not an array you've got the trailing delimiter on, it's a > string. Right. Sorry, bad example. it was just the one example I could think of where you could get an empty element at the end of your array. Clearly, appl

Re: [PHP] Arrays: Comma at end?

2012-02-07 Thread Micky Hulse
On Tue, Feb 7, 2012 at 12:19 PM, Micky Hulse wrote: > Yah, ditto! :D $s = 'foo,bar,'; print_r(explode(',', $s)); The output is: Array ( [0] => foo [1] => bar [2] => ) That's one instance where I know you have to be cautious about the trailing

Re: [PHP] Arrays: Comma at end?

2012-02-07 Thread Micky Hulse
On Tue, Feb 7, 2012 at 12:15 PM, Paul M Foster wrote: > I've always avoided trailing array commas, but only because I was under > the impression that leaving one there would append a blank array member > to the array, where it might be problematic. Yes? No? Yah, ditto! :D In my few simple tests,

Re: [PHP] Arrays: Comma at end?

2012-02-07 Thread Micky Hulse
Hi Ashley! Thanks for your quick and informative reply, I really appreciate it. :) On Tue, Feb 7, 2012 at 12:10 PM, Ashley Sheridan wrote: > It's easy to add and remove elements without making sure you have to check > the trailing comma. It's also OK in Javascript to use the trailing comma, as

[PHP] Arrays: Comma at end?

2012-02-07 Thread Micky Hulse
Was there ever a time when having a comma at the end of the last array element was not acceptable in PHP? I just did a few quick tests: ... and it looks like having that comma ain't no big deal. I can't believe that I always thought that having the trailing com

Re: [PHP] pathinfo function

2011-07-26 Thread Micky Hulse
On Tue, Jul 26, 2011 at 3:47 PM, Tim Streater wrote: > that I will get an error if I try to reference $info["extension"] ?? >From what I can tell via reading the docs: "The following associative array elements are returned: dirname, basename, extension (if any), and filename."

Re: [PHP] Re: PHP frameworks

2011-07-21 Thread Micky Hulse
On Thu, Jul 21, 2011 at 6:44 PM, Shawn McKenzie wrote: > A la CakePHP.  Will automagically build controllers and views for the > admin of your tables/models if you wish. Oooh, interesting! I will check out CakePHP! Thanks for tip! :) -- PHP General Mailing List (http://www.php.net/) To unsubscri

Re: [PHP] Re: PHP frameworks

2011-07-21 Thread Micky Hulse
On Thu, Jul 21, 2011 at 5:33 PM, Micky Hulse wrote: > Your app models? More specifically, your app model data. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP frameworks

2011-07-21 Thread Micky Hulse
On Thu, Jul 21, 2011 at 5:21 PM, Jim Lucas wrote: > So, what would said admin interface allow you to administrate? Your app models? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP frameworks

2011-07-21 Thread Micky Hulse
+1 for CI. If you search the group archives, a little while back I asked about micro PHP frameworks and got a ton of good replies. So folks, how'z about a PHP framework with a built-in admin interface? That would be pretty sweet. :) -- PHP General Mailing List (http://www.php.net/) To unsubscri

Re: Re: [PHP] Your language sucks because...

2011-07-14 Thread Micky Hulse
On Thu, Jul 14, 2011 at 4:19 PM, George Langley wrote: > He gave you a beautiful hint: :: slaps self on forehead :: I should've known!!! :D Thanks! Micky -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: [PHP] Your language sucks because...

2011-07-14 Thread Micky Hulse
On Thu, Jul 14, 2011 at 4:02 AM, Richard Quadling wrote: > My daughter (6 or 7 at the time) came up with T, M and E. I was > abso-bloody-lutely amazed she managed to find a word starting with T, > M and E. What was the word? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visi

Re: [PHP] Your language sucks because...

2011-07-13 Thread Micky Hulse
Under the CSS section: No way to modularize or programmatically generate lengths. Can't say: { width:50% - 2px; } That's so true!! I wish I could do the above... Oh, and why is the PHP section so damned long?!? Good read, thanks. :) -- PHP General Mailing List (http://www.php.net/) To uns

Re: [PHP] What is a label?

2011-07-13 Thread Micky Hulse
They must mean labels as in "general naming convention rules for programming"... Like not naming a variable/function "label" with a number at the front. Here's a page about variables: http://www.php.net/manual/en/language.variables.basics.php Variable names follow the same rules as other labels

Re: [PHP] best ways to recruit volunteers for a PHP framework

2011-06-28 Thread Micky Hulse
+1 for GitHub or BitBucket. I have not visited SourceForge for years... I just like using Git myself. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] caching problem

2011-06-28 Thread Micky Hulse
OP: Can we see the methods in question? Have you tried running the code on a different server/host? Have you added any scaffolding to your methods in order to test your caching theory? This would be the first thing I would try (i.e. create random number (or whatever), concat with variable vals g

Re: Re: [PHP] iPhone sadness

2011-05-30 Thread Micky Hulse
The WebDesign-L has been around since early 1997... For as long as I can remember, the policy (on all list-servs I post to) has been "no top posting" and "trim quotes". Here's WD-L's policy page: Lot's of great info there... Under the "Message Body" heading:

Re: [PHP] Re: Need pro advice: Is Pear installed and/or setup correctly?

2011-05-27 Thread Micky Hulse
On Fri, May 27, 2011 at 12:48 PM, Micky Hulse wrote: > Looks like the host changed my include path: > I will probably ditch the whole Pear idea and use something else. Well, actually, it looks like having PEAR on the include path did help. Mail.php was found... It was Mail_Mime/mime.ph

Re: [PHP] Re: Need pro advice: Is Pear installed and/or setup correctly?

2011-05-27 Thread Micky Hulse
Looks like the host changed my include path: (include_path='.:/usr/lib/php:/usr/local/lib/php:/usr/local/lib/php/PEAR') I am still getting "file not found" include errors. I am guess that Mail.php and Mail_Mime/mime.php are extras that are not installed. This is my first time trying to use Pear

Re: [PHP] Re: Need pro advice: Is Pear installed and/or setup correctly?

2011-05-27 Thread Micky Hulse
On Fri, May 27, 2011 at 12:06 PM, Philip Thompson wrote: > The host is apparently using PHP 5.3 - this message started to appear in > this version. Use date_default_timezone_set() somewhere in your code to > explicitly set your timezone. I'm in the central US, so I use > 'America/Chicago'. See the

[PHP] Re: Need pro advice: Is Pear installed and/or setup correctly?

2011-05-27 Thread Micky Hulse
On Fri, May 27, 2011 at 10:27 AM, Micky Hulse wrote: > Would it be safe for me to conclude that Pair is not setup properly? Haha, "Pear" the package, not the host. :D http://www.pair.com/ Typo. My bad. Also, what the heck does this mean: "It is not safe to rely on the

[PHP] Need pro advice: Is Pear installed and/or setup correctly?

2011-05-27 Thread Micky Hulse
What do you think this means. This code: [code] [/code] Outputs these error messages: http://pastebin.com/ZKtyELT1 But this code: [code] [/code] Returns "bool(true)" Looking at these docs: http://pear.php.net/manual/en/installation.checking.php ... it says: "In every case, PEAR's p

Re: [PHP] Bold links

2011-05-15 Thread Micky Hulse
Hi Tedd! On Sun, May 15, 2011 at 4:41 PM, tedd wrote: > I vaguely remember using tags in the markup for SEO considerations with > the idea that I was going to change them to with a search/replace. > Unfortunately, that did not happen until now. Thanks for letting me know. Hehe! I dig it! :) I

Re: [PHP] Bold links

2011-05-10 Thread Micky Hulse
[OT] Thanks for the informative reply Tedd. I respect your opinion and I don't think my approach is more right than yours. I am wondering if this is just a DTD thing. I always use an HTML 4.01 strict DTD and have not used an XHTML doctype in ages. As far as I can tell, the specs in XHTML say "no

Re: [PHP] Bold links

2011-05-09 Thread Micky Hulse
On Mon, May 9, 2011 at 4:18 PM, Joshua Kehn wrote: > If you are only make the last name bold for stylistic purposes you should > use CSS and a class. If you have text that needs to be phasized or > ly put use the appropriate tags. Hrmm, I personally don't think there is anything wrong with in th

Re: [PHP] Bold links

2011-05-09 Thread Micky Hulse
On Mon, May 9, 2011 at 2:56 PM, tedd wrote: > Really? > How does the blind via readers, such as JAWS, understand what a is? > First, never use -- or for that matter. > Second, use or instead. Readers can understand and render > STRONG and EMPHASIZED text, but not and text -- those tags mean

Re: [PHP] newbie - function is undefined

2011-04-01 Thread Micky Hulse
Maybe try: echo 'getText("p1")'; I think that should work. Good luck. Cheers, Micky -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Howdy (new in here)

2011-02-15 Thread Micky Hulse
On Tue, Feb 15, 2011 at 2:00 PM, David Harkness wrote: > I use K&R. I started with it just as shown but as monitors increased in size > I stopped cuddling the else so it's now on its own line, aligning the if, > elseif, and else nicely. One of the developers at my company uses the > truly abominab

Re: [PHP] switch case madness

2011-01-19 Thread Micky Hulse
On Wed, Jan 19, 2011 at 6:45 AM, Joshua Kehn wrote: > On Jan 19, 2011, at 9:43 AM, Jay Blanchard wrote: >> [snip] >> ... >> [/snip] >> Imagine when there'll be the day when you do not have to code at >> all...just copy 'n paste snippets together in the order that you wish >> them to work in and Vo

Re: [PHP] Re: Re: Need code like

2010-12-27 Thread Micky Hulse
On Mon, Dec 27, 2010 at 5:29 PM, Michelle Konzack wrote: > I have gotten some ideas and now I start coding my own stuff, which is > more flexibel in design and such. Hrmm, just found this info: http://blog.dixo.net/2009/09/15/pastebin-org-considered-harmful/ So, I assume you are looking for s

Re: [PHP] EE1 plugin code/htmlentities() question

2010-11-30 Thread Micky Hulse
Hi Richard! Thanks for the reply, I really appreciate the help. :) On Tue, Nov 30, 2010 at 5:49 AM, Richard Quadling wrote: > I'm guessing that   is only valid in HTML. I see. Ah, it looks like I need to be Googling for "htmlentities and xml". Thanks for tip! > Not sure why / would be encode

[PHP] EE1 plugin code/htmlentities() question

2010-11-29 Thread Micky Hulse
Hello, I was looking at this ExpressionEngine plugin: Description: This plugin converts reserved XML characters to entities. It is used in the RSS templates. ... Curious about this code: trim(str_replace(array('/', ' '), array("/", ' 

Re: [PHP] Convert hex string to hex value?

2010-10-22 Thread Micky Hulse
On Thu, Oct 21, 2010 at 11:45 PM, Micky Hulse wrote: > Hmmm, I wonder if I am going about this all wrong. OMG, too easy: my_method(hexdec('0x' . $base)) How did I miss that!?! I could swear I tried that earlier. Sorry to bug ya'll! Cheers, Micky -- PHP General

Re: [PHP] Convert hex string to hex value?

2010-10-21 Thread Micky Hulse
Hi Adam! Many thanks for you quick reply and for the help. :) On Thu, Oct 21, 2010 at 11:31 PM, Adam Richardson > In your second example, you're directly inputing a hex number, so there's no > issue. Interesting... I wish I could just input the hex directly, unfortunately I don't have that option

[PHP] Convert hex string to hex value?

2010-10-21 Thread Micky Hulse
Hi, I must be tired because I can't figure this out... I am sure it is something obvious. I need to pass a hex value to a method, but I can't figure out how to convert a hex string to a hex value. For exmaple: $base = '96989b' my_method('0x' . $base) The above does not work with my_method().

Re: [PHP] break out of

2010-10-11 Thread Micky Hulse
If I understand the question correctly, I think the answer is yes. Maybe something like this: Normal HTML, or MT tags, here. Normal HTML, or MT tags, here. Normal HTML, or MT tags, here. "Alternative syntax for control structures"

Re: [PHP] 1984 (Big Brother)

2010-09-13 Thread Micky Hulse
On Mon, Sep 13, 2010 at 5:05 PM, Daniel Brown wrote: >    It would be cheaper to employ the same method used on some > lawnmowers and required on Jet Skis and Skidoos: a cable with a clip > worn by the rider.  The rider falls off, the cable releases from the > vehicle, disengaging the throttle and

Re: [PHP] 1984 (Big Brother)

2010-09-13 Thread Micky Hulse
On Mon, Sep 13, 2010 at 2:43 PM, chris h wrote: > "How would you like the system to be aware of rather or not you're in the > office? On his way in to the office: Motion sensing camera connected to a mechanical pointer stick aimed to trigger the server power button. On his way out of the office

Re: [PHP] Do you have some standard for defined the variable in program language?

2010-07-27 Thread Micky Hulse
Some style guides you might find interesting (the Code Igniter style guide might be the most relevant to this discussion): Django: Coding style ExpressionEngine: General Style and Syntax Flex: SDK coding conventions and best practices

Re: [PHP] finding the web root

2010-06-08 Thread Micky Hulse
> $_SERVER['DOCUMENT_ROOT'] > although a post on the manual mentions some variability between > environments. $root = (array_key_exists('DOCUMENT_ROOT', $_ENV)) ? $_ENV['DOCUMENT_ROOT'] : $_SERVER['DOCUMENT_ROOT']; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://w

Re: [PHP] php photo galery

2010-05-18 Thread Micky Hulse
> If anyone has anything similar to this please let me know. SlidesShowPro Director: You could use the Director API and create a PHP gallery with your own code, or you could use the SlideShowPro flash player. The Director interface is ve

Re: [PHP] PHP include security

2010-04-19 Thread Micky Hulse
Hi Michiel! > One thing to keep in mind is that this one doesn't take eval() vs regular > include execution time into account, in case you were still considering > using it. According to this page, it's many times I was still considering it... I mean, I am still exploring all my options for the s

Re: [PHP] PHP include security

2010-04-18 Thread Micky Hulse
On Sun, Apr 18, 2010 at 10:23 AM, Michiel Sikma wrote: > I would prefer to use include() since it runs the code in the same context, > .. > with your data rather than printing it right away. Thanks for the reply Michiel, I really appreciate it. :) For some benchmarks on the different types o

[PHP] Re: PHP include security

2010-04-17 Thread Micky Hulse
> What do ya'll think? Any suggestions? Sorry for the duplicate posting... I had some problems signing-up for the list. :( Also, I moved my test code to sniplr: TIA! Cheers M -- PHP General Mailing List (http://www.php.net/

Re: [PHP] PHP include security

2010-04-17 Thread Micky Hulse
Hi Michiel! Thanks for the help, I really appreciate it. :) > It depends. What's exactly do you want to prevent? It doesn't seem like a > .. > include, say, additional HTML content, use file_get_contents() instead. Very good points. My goal was to write a plugin that would allow me to include

[PHP] PHP include security

2010-04-16 Thread Micky Hulse
Hi, Code: = ob_start(); switch ($this->command) { case 'include': @include($x); break; default: @readfile($x); } $data = ob_get_contents(); ob_end_clean(); = The above code snippet is used in a class which would al

Re: [PHP] Include security?

2010-04-16 Thread Micky Hulse
> if allow_url_include is turned off, you don't have to worry much about http, > if '.' is a invalide char, you can't include *.php... > the include path probably should be the inc(whatever the name) > folder(not accessible from web) instead of the web root and '..' > should be disallowed Hi Ryan!

[PHP] Include security?

2010-04-16 Thread Micky Hulse
Hi, Code: = ob_start(); switch ($this->command) { case 'include': @include($x); break; default: @readfile($x); } $data = ob_get_contents(); ob_end_clean(); = The above code snippet is used in a class which would allow d

Re: [PHP] preg_replace_callback(), how to pass function argument/param?

2008-03-30 Thread Micky Hulse
Casey wrote: What does mah_process_tags do anyway? XD Ah, hehe... Oh, basically I am trying to write a plugin for the Textpattern CMS: processTags() is a core TXP function... Basically, it parses any TXP template tags (). Long story short, I am am modifying the

Re: [PHP] preg_replace_callback(), how to pass function argument/param?

2008-03-30 Thread Micky Hulse
Casey wrote: Hmmm. I've searched around, and it seems that only a global would work :/ Thanks for the help Casey! I really appreciate it. :) Yah, I think I will use a global for now... Until I can think of an alternative coding approach. Have a good one! Cheers, Micky -- Wishlist:

Re: [PHP] preg_replace_callback(), how to pass function argument/param?

2008-03-30 Thread Micky Hulse
Casey wrote: preg_replace_callback($f, 'mah_processTags(\'$0\', $arg1)', $text); Does this work? Awww, does not seem to work. :( But maybe I need to dink with the code a bit more... I would like to avoid setting a global here. :D Thanks for the help Casey! I will let you know if I get it wor

[PHP] preg_replace_callback(), how to pass function argument/param?

2008-03-30 Thread Micky Hulse
Hi, This is probably simple to answer for most of ya'll, but... preg_replace_callback($f, 'mah_processTags', $text); Besides the matches, how would I pass function args/param to mah_processTags()? For example, I would like to do something like this: preg_replace_callback($f, 'mah_processTag

Re: [PHP] www. not working

2008-02-15 Thread Micky Hulse
Jim Lucas wrote: If you are running Apache, you do realize that all of this can be done in Apache instead of PHP right? .htaccess example: # Power-up the rewrite engine: RewriteEngine on # Redirect all non-www traffic: RewriteCond %{HTTP_HOST} ^mysite\.com [NC] RewriteRule ^/?(.*)$ http://www.

Re: [PHP] variables

2007-08-19 Thread Micky Hulse
Augusto Morais wrote: I want create a variable based in another variable. Example: Maybe this will give you some ideas?: Good luck! Cheers, Micky -- Wishlists: Switch:

Re: [PHP] OT- why is network solutions more than godaddy?

2007-08-03 Thread Micky Hulse
I use and love 8.88$, plus whois guard. The control panel is great. Fast customer service. Also, I personally would avoid mixing host and registrar. Cheers, M -- Wishlists: Switch: BCC?:

Re: [PHP] Re: Rules of Engagement

2007-07-29 Thread Micky Hulse
Tom Ray [Lists] wrote: Well I think my only issue with it is that this is a group discussion .. to the list by default. I agree with Tom. I ussually hit reply, and take a few seconds to delete all the emails except the list email -- not very hard. :) -- Wishlists:

Re: [PHP] The Official OT "Name Tedd's Grandson" Thread

2007-07-26 Thread Micky Hulse
Congrats Tedd! :) Cheers, Micky -- Wishlists: Switch: BCC?: My: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP short tags: Questions

2007-07-12 Thread Micky Hulse
Hey Richard, thanks for the reply. I appreciate it. :) Richard Lynch wrote: http://php.net/ Yikes! I guess it was one of those RTFM question/answers! Lol. :D #2 sounds awfully bogus to me... Yeah... Hmm, now I am starting to wonder where I heard/read that. Maybe it was a co-worker. I am g

Re: [PHP] PHP short tags: Questions

2007-07-12 Thread Micky Hulse
Hi Chris, thanks for the quick reply. I appreciate your help. Chris wrote: Sure. Thanks. :) 1 & 3 definitely. No idea how it's a security risk. Ah, great. Thanks for clarification. I probably mis-read the info about it being a security risk. Have a great day, Cheers, Micky -- Wishlists:

[PHP] PHP short tags: Questions

2007-07-12 Thread Micky Hulse
Hi, I am trying to describe why php short tags failed to work on a server... here is my simplified explanation: "it had to do with the server settings... The short_open_tag directive in php.ini was set to 0." Do you think that is an ok way to describe the problem to a technically literate

Re: [PHP] help with multi dimensional arrays

2007-05-24 Thread Micky Hulse
Micky Hulse wrote: Looks like you are missing a comma on line 3. Doi, meant "semi-colon", not comma... Lol. Also, when I get PHP errors, if not obvious, I check the previous line also... If says something like "error on line 7" I will look at both line six and seven. O

Re: [PHP] help with multi dimensional arrays

2007-05-23 Thread Micky Hulse
Looks like you are missing a comma on line 3. James Lockie wrote: I get a syntax error on strlen. $newTypes = array(); $newTypes[0] = array(); $newTypes[0][0] = "Starting with" $newTypes[0][1] = strlen( $newTypes[0][0] ); -- Wishlists: Switch:

Re: [PHP] Remove domain: What do think of this approach?

2007-05-16 Thread Micky Hulse
Robin Vickery wrote: use parse_url() http://www.php.net/parse_url then append the 'path' part to document root ? OMG, that looks like it will do the trick! Jeez, how did I miss that. I feel like a dufus. Are list members allowed at least one "RTFM" question per month? :D Thanks Robin! I appr

Re: [PHP] Remove domain: What do think of this approach?

2007-05-16 Thread Micky Hulse
Micky Hulse wrote: /* ** Output: ** /web1/httpd/htdocs/blogs/images/uploads */ Ooops, typed that wrong, example output should be: /web1/httpd/htdocs/folder/foo -- Wishlists: <http://snipurl.com/1gqpj> Switch: <http://browsehappy.com/> BCC?: <http://snipurl.com/w6f8>

[PHP] Remove domain: What do think of this approach?

2007-05-16 Thread Micky Hulse
Hi folks, I hope everyone is having a good week. :) Let me cut to the chase... Basically, I need to get this: http://www.site.com/folder/foo To work like this: $_SERVER['DOCUMENT_ROOT'].'folder/foo/file.ext'; For use with getimagesize() and a few other functions (trying to avoid possible ope

Re: [PHP] Making code public -- What steps to take? GPL?

2007-05-15 Thread Micky Hulse
Howdy, I just wanted to say, to all who responded, many many thanks for the help. I greatly appreciate it. I have not made my decision just yet, but it has been great hearing the advice and reading about all the different options available... Well, anyay, thanks! This list has been a life sav

Re: [PHP] Making code public -- What steps to take? GPL?

2007-05-13 Thread Micky Hulse
Daniel Brown wrote: Right, I alluded to that, but perhaps I should've said that exactly, as it may bother some people. In my case, it doesn't bother me in the least, just as I use LAMP (all open source) to make a living. Oh, I think I understood that. But there is always room for clarifica

Re: [PHP] Making code public -- What steps to take? GPL?

2007-05-13 Thread Micky Hulse
Crayon Shin Chan wrote: Don't forget the MIT license allows people to incorporate your code into commercial products and sell for profit without having to give anything back (money/improved code/etc). Hi Cayon, thanks for clarification. I just woke up, so I have not had a chance to really res

Re: [PHP] Making code public -- What steps to take? GPL?

2007-05-13 Thread Micky Hulse
Hey! Tijnema! Thanks for the quick reply. :) Tijnema ! wrote: I'd say, don't worry too much about the license, just put your name on top of the code, and some other nonsense, like: You're allowed to use this code, as long as you leave above lines intact., where above your credit is listed of cou

Re: [PHP] Making code public -- What steps to take? GPL?

2007-05-13 Thread Micky Hulse
Daniel Brown wrote: If you want to retain some credit but don't care about distribution/modification/redistribution, check out the MIT license (more commonly referred to as the X or X11 license). We're using it in a project Ah, great tip! :D I will definitely read-up on the MIT license aft

Re: [PHP] Making code public -- What steps to take? GPL?

2007-05-13 Thread Micky Hulse
Micky Hulse wrote: Or, should I just not worry about this? Well shux! I love it when I answer my own questions: <http://www.phpfreaks.com/tutorials/19/0.php> I blame it on lack of sleep! The GNU GPL License sounds like what I need. :D Cheers, M -- Wishlists: <http://snipurl.

[PHP] Making code public -- What steps to take? GPL?

2007-05-13 Thread Micky Hulse
Hi, I am in the process of writing a simple but useful plugin for a blogging application Long story short, I want to give-back to the community (i.e. free plugin), but would like to make an attempt at retaining some credit if folks port/use to/in other scripts/blogs/cms apps. Any tips

Re: [PHP] One class, many methods: PHP4.x: Q's

2007-05-11 Thread Micky Hulse
Hi Eric! Thanks for your reply. :) Eric Butera wrote: If at all possible you're going to want to use PHP5 if you're doing ...snip... of those "problems" have been alleviated. Gosh! I wish I could use PHP5... Unfortunately the hosting company I am using has not upgraded. I can not wait to star

Re: [PHP] One class, many methods: PHP4.x: Q's

2007-05-10 Thread Micky Hulse
Micky Hulse wrote: Ah, well Chapter 6, page 144-145 have helped clear-up a little bit of my confusion: Sorry, forgot to mention what book I was refering to: O'Reilly Programming PHP By Rasmus Lerdorf & Kevin Tatroe <http://snipurl.com/1k4ug> -- Wishlists: <http:/

Re: [PHP] One class, many methods: PHP4.x: Q's

2007-05-10 Thread Micky Hulse
Micky Hulse wrote: Seems like I have always read/heard that it is best to explicitly pass variables as function parameters... vs throwing around "globals." Ah, well Chapter 6, page 144-145 have helped clear-up a little bit of my confusion: " .. Here's a simple cla

Re: [PHP] One class, many methods: PHP4.x: Q's

2007-05-10 Thread Micky Hulse
Richard Davey wrote: Within the constructor for Randimg you could set a local protected variable: class Randimg { var $docroot = false; function Randimg () { $this->docroot = $_SERVER['DOCUMENT_ROOT']; } Hi Rich and all, just one other quick question... Which approach below would

Re: [PHP] One class, many methods: PHP4.x: Q's

2007-05-10 Thread Micky Hulse
Richard Davey wrote: I don't know if that's the *best* way, personally I'd not really do it like that, but no-one can tell you it is 'right' or 'wrong' because it .. Perfect answer! Thanks! I do not have too many error messages to store, but I do like the constant approach... Looks like

  1   2   >