Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 4th May 2011, 09:11 PM   #1
HyperActive Warrior
War Room Member
 
ussher's Avatar
 
Join Date: 2010
Location: Tokyo
Posts: 314
Thanks: 27
Thanked 43 Times in 42 Posts
Default
How do i post code in replies?
Share on: 
fb share twitter share gplus share more share

If i post some php code in the starter thread it comes out like this:


PHP Code:
<?php
$fruits 
= array(
 
'apple',
 
'orange',
 
'pear'
);

foreach(
$fruits as $fruit){
print 
"the fruit is: $fruit";
}
but if i do the same thing in a reply all the variables that are prefixed with $ get stripped out.

How do i post code in replies in the warrior forum?

"Jamroom is a Profile Centric CMS system suitable as a development framework for building entire communities. Highly modular in concept. Suitable for enterprise level development teams or solo freelancers."
- jamroom.net
Download Jamroom free: Download
ussher is offline  
Unread 4th May 2011, 09:12 PM   #2
HyperActive Warrior
War Room Member
 
ussher's Avatar
 
Join Date: 2010
Location: Tokyo
Posts: 314
Thanks: 27
Thanked 43 Times in 42 Posts
Default
Re: How do i post code in replies?
Share on: 
fb share twitter share gplus share more share

same thing in a reply:

PHP Code:
<?php
 
= array(
 
'apple',
 
'orange',
 
'pear'
);

foreach( as ){
print 
"the fruit is: ";
}

"Jamroom is a Profile Centric CMS system suitable as a development framework for building entire communities. Highly modular in concept. Suitable for enterprise level development teams or solo freelancers."
- jamroom.net
Download Jamroom free: Download
ussher is offline  
Unread 5th May 2011, 12:08 AM   #3
You reap what you sow.
War Room Member
 
Nail Yener's Avatar
 
Join Date: 2008
Location: Sometimes you don't.
Posts: 1,078
Thanks: 196
Thanked 411 Times in 243 Posts
Default
Re: How do i post code in replies?
Share on: 
fb share twitter share gplus share more share

I gave up posting PHP codes on this forum a while ago. It doesn't work as it should and I don't know why. I contacted support but I couldn't find a solution.
Nail Yener is offline  
The Following User Says Thank You to Nail Yener For This Useful Post:
Unread 5th May 2011, 12:46 AM   #4
HyperActive Warrior
War Room Member
 
ussher's Avatar
 
Join Date: 2010
Location: Tokyo
Posts: 314
Thanks: 27
Thanked 43 Times in 42 Posts
Default
Re: How do i post code in replies?
Share on: 
fb share twitter share gplus share more share

makes it a _lot_ harder to be helpful, especially in the programming section.

"Jamroom is a Profile Centric CMS system suitable as a development framework for building entire communities. Highly modular in concept. Suitable for enterprise level development teams or solo freelancers."
- jamroom.net
Download Jamroom free: Download
ussher is offline  
Unread 5th May 2011, 12:52 AM   #5
You reap what you sow.
War Room Member
 
Nail Yener's Avatar
 
Join Date: 2008
Location: Sometimes you don't.
Posts: 1,078
Thanks: 196
Thanked 411 Times in 243 Posts
Default
Re: How do i post code in replies?
Share on: 
fb share twitter share gplus share more share

Originally Posted by ussher View Post

makes it a _lot_ harder to be helpful, especially in the programming section.
My solution to that is to put the code into a simple text file and upload it to my personal website and give the link in the post where I want to mention the code.
Nail Yener is offline  
The Following User Says Thank You to Nail Yener For This Useful Post:
Unread 5th May 2011, 03:37 AM   #6
HyperActive Warrior
War Room Member
 
ussher's Avatar
 
Join Date: 2010
Location: Tokyo
Posts: 314
Thanks: 27
Thanked 43 Times in 42 Posts
Default
Re: How do i post code in replies?
Share on: 
fb share twitter share gplus share more share

That is very generous of you. I think ill use the IRC common method of throwing code into a pastebin like:

Pastebin.com - #1 paste tool since 2002!

test to see if it works:
[PHP] does this work for the warrior forum? - Pastebin.com

"Jamroom is a Profile Centric CMS system suitable as a development framework for building entire communities. Highly modular in concept. Suitable for enterprise level development teams or solo freelancers."
- jamroom.net
Download Jamroom free: Download
ussher is offline  
Unread 5th May 2011, 03:41 AM   #7
You reap what you sow.
War Room Member
 
Nail Yener's Avatar
 
Join Date: 2008
Location: Sometimes you don't.
Posts: 1,078
Thanks: 196
Thanked 411 Times in 243 Posts
Default
Re: How do i post code in replies?
Share on: 
fb share twitter share gplus share more share

Originally Posted by ussher View Post

That is very generous of you. I think ill use the IRC common method of throwing code into a pastebin like:

Pastebin.com - #1 paste tool since 2002!

test to see if it works:
[PHP] does this work for the warrior forum? - Pastebin.com
Yes, I know about that site and the code works just fine, but personally, I wouldn't depend on a third party site for this case as you wouldn't know when they will come and go and change their linking structure, etc.
Nail Yener is offline  
Unread 5th May 2011, 04:08 AM   #8
HyperActive Warrior
War Room Member
 
ussher's Avatar
 
Join Date: 2010
Location: Tokyo
Posts: 314
Thanks: 27
Thanked 43 Times in 42 Posts
Default
Re: How do i post code in replies?
Share on: 
fb share twitter share gplus share more share

Agreed. The best solution would be to paste it into here. but for whatever reason that doesn't seam to be an option.

Take a look at this thread to see my lame attempt to try to get the code into this forum:
http://www.warriorforum.com/programm...eal-links.html

"Jamroom is a Profile Centric CMS system suitable as a development framework for building entire communities. Highly modular in concept. Suitable for enterprise level development teams or solo freelancers."
- jamroom.net
Download Jamroom free: Download
ussher is offline  
Closed Thread


Bookmarks

Tags
code, post, replies


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 03:05 AM.