Welcome Guest.   Make a donation to an author on the site October 25, 2014, 12:32:52 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Your Support Funds this Site: View the Supporter Yearbook.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Ability to copy geshi formatted code text.. help me test?  (Read 9025 times)
mouser
First Author
Administrator
*****
Posts: 33,597



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« on: May 24, 2009, 10:52:38 PM »

Can anyone help me test the new ability to copy the text of geshi syntax highlighted text?

Normal attempts to select and copy geshi syntax highlighted text results in garbage that is impossible to reuse outside the forum.

I've added a new copy/print link at the top of geshi syntax highlighted code which should pop up a plain text window to copy from -- let's see if it works -- let me know.

here is a SAMPLE CODE BLOCK to test out the copy function on:
Formatted for PHP with the GeSHI Syntax Highlighter [copy or print]
  1. $entries = array();
  2. $total_t = 0;
  3. $total_s = 0;
  4. foreach ($cache_hits as $h)
  5. {
  6. $entries[] = $h['d'] . ' ' . $h['k'] . ': ' . comma_format($h['t'], 5) . ' - ' . $h['s'] . ' bytes';
  7. $total_t += $h['t'];
  8. $total_s += $h['s'];
  9. }
« Last Edit: May 24, 2009, 11:28:09 PM by mouser » Logged
mouser
First Author
Administrator
*****
Posts: 33,597



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: May 24, 2009, 10:54:20 PM »

note: you may have to do a ctrl+refresh of the page in order to force the forum to reload the latest javascript code on the site instead of using cache.
Logged
argv
Supporting Member
**
Posts: 45


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #2 on: May 25, 2009, 12:55:35 AM »

It seems to work fine doing paste in Notepad++, just the formating is lost; is this what you wanted to test?

   1.
      $entries = array();
   2.
      $total_t = 0;
   3.
      $total_s = 0;
   4.
      foreach ($cache_hits as $h)
   5.
      {
   6.
      $entries[] = $h['d'] . ' ' . $h['k'] . ': ' . comma_format($h['t'], 5) . ' - ' . $h['s'] . ' bytes';
   7.
      $total_t += $h['t'];
   8.
      $total_s += $h['s'];
   9.
      }

Logged
mouser
First Author
Administrator
*****
Posts: 33,597



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: May 25, 2009, 01:05:43 AM »

those messed up numbers demonstrate the problem with normal select and copy.
try clicking on the link that says "[copy or print]" to see a new window popup with clean plain text you can copy properly -- that's the new thing.
Logged
argv
Supporting Member
**
Posts: 45


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #4 on: May 25, 2009, 01:11:36 AM »

It's better:

$entries = array();
   $total_t = 0;
   $total_s = 0;
   foreach ($cache_hits as $h)
      {
      $entries[] = $h['d'] . ' ' . $h['k'] . ': ' . comma_format($h['t'], 5) . ' - ' . $h['s'] . ' bytes';
      $total_t += $h['t'];
      $total_s += $h['s'];
      }
Logged
lanux128
Global Moderator
*****
Posts: 6,109



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #5 on: May 25, 2009, 02:40:48 AM »

yeah, it works in metapad & PSPad.
Logged

cranioscopical
Friend of the Site
Supporting Member
**
Posts: 4,182



see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: May 25, 2009, 10:17:51 AM »

Works fine with Kedit.
Logged

Chris
mouser
First Author
Administrator
*****
Posts: 33,597



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #7 on: May 25, 2009, 01:21:52 PM »

ok it works, no more reports needed. thumbs up
Logged
app103
That scary taskbar girl
Global Moderator
*****
Posts: 5,277



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #8 on: May 29, 2009, 09:54:26 PM »

Actually, it doesn't work for me. Just makes the page jump to top.
Logged

wreckedcarzz
Charter Member
***
Posts: 1,620



Happy wolfie ^_^

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #9 on: May 30, 2009, 12:06:08 AM »

Actually, it doesn't work for me. Just makes the page jump to top.

Same here, Firefox 3.0.10 on Vista SP1
Logged

New website! With a fancy domain name and everything! *gasp*
http://www.wreckedcarzz.com/
mouser
First Author
Administrator
*****
Posts: 33,597



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #10 on: May 30, 2009, 12:14:47 AM »

somehow i broke it.. thanks for reporting..
working to fix it now.
Logged
mouser
First Author
Administrator
*****
Posts: 33,597



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #11 on: May 30, 2009, 12:41:02 AM »

ok should be working again.. really goes to show you that not even what you think is the simplest trivial change should ever be uploaded and assumed to work without testing.  embarassed
Logged
Coeluh
Supporting Member
**
Posts: 273


Family Guy ^^

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #12 on: June 06, 2009, 01:34:26 PM »

Copying doesnt work yet, I just get a popup
Logged
Ath
Supporting Member
**
Posts: 2,235



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #13 on: June 07, 2009, 09:12:41 AM »

It's just fine over here too, also tried the 'wrong' copy, by selecting the forum text, and that worked as bad as argv showed.

Thnx
Ath
Logged

fenixproductions
Honorary Member
**
Posts: 1,170



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #14 on: June 09, 2009, 08:41:34 PM »

2mouser
I am not sure it's the same feature but take a look here:
http://www.donationcoder....m/index.php?topic=17398.0

If you click on copy or print link in skrommel's code, popup with plain text will appear but backslashes are missing!

It took me a while to figure out why his code is not working for me until I've realized what is wrong.

P.S. Tested under Opera only.
Logged

Надо было учиться, а не камни в школу бросать...
--
When I am bored I write for displaynone smiley
--
f0dder is my personal hero smiley
mouser
First Author
Administrator
*****
Posts: 33,597



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #15 on: June 09, 2009, 08:42:46 PM »

yikes! you are right!! fixing now!
Logged
mouser
First Author
Administrator
*****
Posts: 33,597



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #16 on: June 09, 2009, 09:02:17 PM »

fixed now hopefully?
Logged
fenixproductions
Honorary Member
**
Posts: 1,170



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #17 on: June 09, 2009, 09:09:14 PM »

2mouser
Seems to be OK.

…and I lost of my precious minutes because of that error Wink
Logged

Надо было учиться, а не камни в школу бросать...
--
When I am bored I write for displaynone smiley
--
f0dder is my personal hero smiley
mouser
First Author
Administrator
*****
Posts: 33,597



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #18 on: June 09, 2009, 11:25:34 PM »

dont blame me, blame Cody, he was stealing all the backslashes to build his nest.
Logged
Coeluh
Supporting Member
**
Posts: 273


Family Guy ^^

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #19 on: June 12, 2009, 05:57:53 PM »

dont blame me, blame Cody, he was stealing all the backslashes to build his nest.
Should it go directly to my clipboard? because that is not working for me...
Logged
mouser
First Author
Administrator
*****
Posts: 33,597



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #20 on: June 12, 2009, 10:40:52 PM »

Quote
Should it go directly to my clipboard? because that is not working for me...

no, you still have to manually ctrl+A and copy to clipboard.. the main functionality of the new feature is to remove the formatting codes and the line numbers.
Logged
Coeluh
Supporting Member
**
Posts: 273


Family Guy ^^

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #21 on: June 13, 2009, 05:23:47 AM »

Quote
Should it go directly to my clipboard? because that is not working for me...

no, you still have to manually ctrl+A and copy to clipboard.. the main functionality of the new feature is to remove the formatting codes and the line numbers.
Will you implement the copy code function?
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.132s | Server load: 0.06 ]