|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
| View Poll Results: Devshed should provide for named code blocks in the format | |||
| I agree | | 12 | 100.00% |
| I disagree | | 0 | 0% |
| Voters: 12. You may not vote on this poll | |||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Named Code Blocks
posted this originally in the Mod's forums, but I can't move it, so I'm posting it again here for suggestion (sorry fellow mods for the duplicate).
maybe this is overkill, but would it be possible to modify the code tags to accept a quoted parameter indicating the name of the code block - in cases where people may want to post more than one block of code? For example, if I wanted to have my module/class name to make it easily recognizable.
__________________
Fisherman "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." - A.Einstein |
|
#2
|
||||
|
||||
|
Seconded
with the addition of adding the same to the PHP tags. This would also be very helpful for posting code blocks of different, related files/scripts:PHP Code:
foo.tpl.php
PHP Code:
bar.php
__________________
# Jeremy Explain your problem instead of asking how to do what you decided was the solution. |
|
#3
|
||||
|
||||
|
Thirded.
__________________
Support requests via PM will be ignored! |
|
#4
|
||||
|
||||
|
Fourthed.
__________________
Free Willy and the Whalers Quote:
|
|
#5
|
||||
|
||||
|
add a poll to this thread
__________________
Miscellaneous Software Viper_SB Developershed E-Support Anyone else play chess? Challenge me |
|
#6
|
||||
|
||||
|
Fifthded.
__________________
Web Design Tips - Posting and You If I've been helpful, and/or you're really nice, consider buying something from my Amazon.com wishlist.
|
|
#7
|
||||
|
||||
|
Ok we will get this on the to do list.
__________________
Developer Shed - Tools For Geeks! |
|
#8
|
||||
|
||||
|
Whoohooo!
|
|
#9
|
||||
|
||||
|
We create a new hack to name CODE blocks.
Code block without name Code:
$tomorrow = mktime(0, 0, 0, date("m") , date("d")+1, date("Y"));
$lastmonth = mktime(0, 0, 0, date("m")-1, date("d"), date("Y"));
$nextyear = mktime(0, 0, 0, date("m"), date("d"), date("Y")+1);
Code block with name Code:
Date formatting
$today = date("F j, Y, g:i a"); // March 10, 2001, 5:16 pm
$today = date("m.d.y"); // 03.10.01
$today = date("j, n, Y"); // 10, 3, 2001
$today = date("Ymd"); // 20010310
$today = date('h-i-s, j-m-y, it is w Day z '); // 05-16-17, 10-03-01, 1631 1618 6 Fripm01
$today = date('\i\t \i\s \t\h\e jS \d\a\y.'); // It is the 10th day.
$today = date("D M j G:i:s T Y"); // Sat Mar 10 15:16:08 MST 2001
$today = date('H:m:s \m \i\s\ \m\o\n\t\h'); // 17:03:17 m is month
$today = date("H:i:s"); // 17:16:17
|
|
#10
|
||||
|
||||
Thanks! Code:
Testing
printf("Hello, World!");
![]()
__________________
~~ Peter ~~ ( My Blog: It's exactly like normal nerdiness, but completely different. ) :: ( Supporter of the EFF & FSF ) :: ( I'm a GNU/Linux addict and Free Software Advocate. ) :: ( How to Ask Questions the Smart Way ) :: ( The Fedora Project, sponsored by Red Hat ) :: ( GNOME: The Free Software Desktop Project ) :: ( GnuPG Public Key ) |
|
#11
|
||||
|
||||
|
Code:
Testing
Sweet! :) PHP Code:
Testing.php
<edit> Cheers, Thaminda! ![]() Last edited by ChiefWigs1982 : July 25th, 2005 at 03:47 PM. |