Toggle Content

Donations

Donate with PayPal!
Help support Pro_News and become a member of our Sponsors Group
The tip jar is at PayPal, but does not require a PayPal account
Anonymous $ 10.00
macavity $ 115.00
RedGerry £ 50.00
Anonymous $ 10.00
minor $ 20.00

Recommended ISP

Tables in BBCode! Updated!

Dragonfly issues as they relate to modules discussed here
Kirim balasanKirim balasan Versi Cetak
Pilih halaman Sebelumnya  1, 2, 3  Selanjutnya

Re: Tables in BBCode! Done!

Kirim Dikirim: Thu Oct 22, 2009 3:43 pm

- rosbif

Incidentally there's a reference to images/pdf_icon.gif which I don't seem to have. Should I have that from somewhere?



Addressing this just one first:

It's just an image that appears on the actual web page after the link as a piece of ether flotsam! One that you'd like to represent an Adobe pdf. It's a matter of finding one that you like and believe that you can use. I used one that's 27x28px, but again it is up to you. You don't need one at all, I put it there just so I could show visitors that it was a PDF.



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback
Site Admin
Site Admin
 
Post: 1229
Sejak: Mar 18, 2006

Re: Tables in BBCode! Done!

Kirim Dikirim: Thu Oct 22, 2009 3:53 pm

- rosbif

Also, I think I mentioned this before somewhere but can't remember where, pressing any BBCode button always puts the code at the bottom of the text, rather than around the highlighted text for example...



Ah, ... how to say? Use a browser? One that understands CSS?

Firefox, Opera and I think all the others but that incompatible-with-everything-including-versions-of-itself Internet Explorer doesn't. (Don't get me wrong, I fully understand Microsoft's strategy of "if it works then break it", but I'm never going to agree with it.)I understand

Could the BBCode be written to handle it? I don't know, it is really beyond me, and I doubted you'd find someone with the skill to do it who'd want to do it, if you see what I mean? But BBCode in it's various interatiosn is very widespread in it's use. So if I were wed to making IE work, I'd probably start by looking to see how it works in latest phpBB or similar, first. 'cos if it's the same there, then your chances are probably slim to none.



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback
Site Admin
Site Admin
 
Post: 1229
Sejak: Mar 18, 2006

Re: Tables in BBCode! Done!

Kirim Dikirim: Thu Oct 22, 2009 4:34 pm

Fair enough - the placement of the code is odd as it works on some modules but not others - for example the submit news page on the DF news module it works as expected!

Incidentally, I thought I'd mentioned another problem but it appears not: My URL with image, List Item and URL with pdf are no longer working. I'm not aware of having changed anything but when clicking any of those three buttons I get an error on the page (IE reports it as Webpage error details:


User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SV1; SLCC1; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30729; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)
Timestamp: Thu, 22 Oct 2009 16:23:19 UTC


Message: Object expected
Line: 1290
Char: 1
Code: 0
URI: www.chantillyexpat.com...o=new.html



More helpfully Firefox reports it as

Error: BBCimg is not defined
Source File: www.chantillyexpat.com...o=new.html
Line: 1



Any thoughts?



rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.11/4.1.22/5.2.17/9.3.3.1

rosbif
BetaTester
BetaTester
 
Post: 492
Sejak: Aug 01, 2007
Lokasi: Chantilly, France

Re: Tables in BBCode! Done!

Kirim Dikirim: Thu Oct 22, 2009 9:06 pm

You had mentioned it. I just hadn't figured it out from the previous request. But from the newer info, I have - indirectly - discovered the problem. What I don't understand is how it ever worked, but still ...

Apply the following 2 edits to includes/javascript/bbcode.js.

Before line containing:

PHP:
function BBCdir(form, field, dirc) { document.forms[form].elements[field].dir=(dirc); }


insert:

PHP:
function BBCli(form, field) { BBCwrite(form, field, '', "[*]", true); }



Before line:

PHP:
function BBCwrite(form, field, start, end, force) {


insert:

PHP:
function BBCimg(form, field, type) {
var FILE = prompt("Enter the image file URL", "http://");
if (FILE == null) { return null; }
if (!FILE) { return alert("Error: You didn't write the image file URL"); }
var URL = prompt("Enter the URL link", "http://");
if (URL == null) { return null; }
if (!URL) { return alert("Error: You didn't write the URL"); }
BBCwrite(form, field, '', "["+type+" url="+URL+"]"+FILE+"[/"+type+"]", true);
return null;
}

function
BBCpdf(form, field, type) {
var URL = prompt("Enter the URL for PDF", "http://");
if (URL == null) { return null; }
if (!URL) { return alert("Error: You didn't write the URL"); }
var TITLE = prompt("Enter the page name", "Web Page Name");
if (BBCwrite(form, field, "["+type+" url="+URL+"]", "[/url]")) { return null; }
if (TITLE == null) { return null; }
var Add = "]"+URL;
if (TITLE) { Add = "="+URL+"]"+TITLE; }
BBCwrite(form, field, '', "["+type+" url"+Add+"[/"+type+"]", true);
return null;
}



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback
Site Admin
Site Admin
 
Post: 1229
Sejak: Mar 18, 2006

Re: Tables in BBCode! Done!

Kirim Dikirim: Thu Oct 22, 2009 9:37 pm

- rosbif

Fair enough - the placement of the code is odd as it works on some modules but not others - for example the submit news page on the DF news module it works as expected!



Good observation!!!!

I can find only 1 difference between News and Pro_News in this area. But it is reported as affecting cross-browser compatibility ...

Can you test this for me please?

In functions.php search for:

PHP:
				'T_INTRO' => '<textarea cols="72" rows="15" name="intro">'.$edit['intro'].'</textarea>',


and replace with:

PHP:
				'T_INTRO' => '<textarea wrap="virtual" cols="72" rows="15" name="intro">'.$edit['intro'].'</textarea>',


and:

PHP:
				'T_STORY' => '<textarea cols="72" rows="15" name="addtext">'.$edit['content'].'</textarea>',


to:

PHP:
				'T_STORY' => '<textarea wrap="virtual" cols="72" rows="15" name="addtext">'.$edit['content'].'</textarea>',


and if it works, you'll want to repeat in admin_functions.php.

And let me know?

TIA!



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback
Site Admin
Site Admin
 
Post: 1229
Sejak: Mar 18, 2006

Re: Tables in BBCode! Done!

Kirim Dikirim: Fri Oct 23, 2009 7:23 am

- layingback

You had mentioned it. I just hadn't figured it out from the previous request. But from the newer info, I have - indirectly - discovered the problem. What I don't understand is how it ever worked, but still ...



You're right - don't know how it worked before but works a treat now!

Adding the 'wrap="virtual"' works in Firefox but in IE8 it just highlights the whole text and then puts the opening code pair at the end still... I know what you're going to say now!



rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.11/4.1.22/5.2.17/9.3.3.1

rosbif
BetaTester
BetaTester
 
Post: 492
Sejak: Aug 01, 2007
Lokasi: Chantilly, France

Re: Tables in BBCode! Done!

Kirim Dikirim: Fri Oct 23, 2009 7:48 am

- rosbif

You're right - don't know how it worked before but works a treat now!


All I can think of is that you had been to my site in same session and browser had cached the javascript?

- rosbif

Adding the 'wrap="virtual"' works in Firefox but in IE8 it just highlights the whole text and then puts the opening code pair at the end still... I know what you're going to say now!


That goes without saying, for a host of very good reasons, but if it works in Submit News, then it ought to work here ... What about IE6 or 7? ANd does it work in IE8 on Submit News?



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback
Site Admin
Site Admin
 
Post: 1229
Sejak: Mar 18, 2006

Re: Tables in BBCode! Done!

Kirim Dikirim: Fri Oct 23, 2009 8:19 am

- layingback

- rosbif

You're right - don't know how it worked before but works a treat now!


All I can think of is that you had been to my site in same session and browser had cached the javascript?

Ah it could well have been. Fixed now though!

- rosbif

Adding the 'wrap="virtual"' works in Firefox but in IE8 it just highlights the whole text and then puts the opening code pair at the end still... I know what you're going to say now!


That goes without saying, for a host of very good reasons, but if it works in Submit News, then it ought to work here ... What about IE6 or 7? ANd does it work in IE8 on Submit News?



I don't have the old IE available anywhere - so can't test. However, it works as it should on Submit News with IE8.



rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.11/4.1.22/5.2.17/9.3.3.1

rosbif
BetaTester
BetaTester
 
Post: 492
Sejak: Aug 01, 2007
Lokasi: Chantilly, France

Re: Tables in BBCode! Done!

Kirim Dikirim: Fri Oct 23, 2009 8:45 am

OK, can I ask you for 1 more test - using IE8?

Edit same lines as before, including the warp="virtual" part, but also AFTER the name="..." stuff but BEFORE the > please try inserting:

PHP:
 onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);"



(As we already know IE does not pass any number of things to its javascript like other browsers do, eg: BASEREF. I also found out that it doesn't pass event info, while building the new fcs template yesterday. So perhaps this falls into the same camp?)



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback
Site Admin
Site Admin
 
Post: 1229
Sejak: Mar 18, 2006

Re: Tables in BBCode! Done!

Kirim Dikirim: Fri Oct 23, 2009 9:00 am

That has done the trick - all seems to be working a treat now! Thank you.

Looks like you've recovered after your upheaval - I'll have to start pestering you for a hack for Pro News on a different thread when I get a chance!

Thanks again



rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.11/4.1.22/5.2.17/9.3.3.1

rosbif
BetaTester
BetaTester
 
Post: 492
Sejak: Aug 01, 2007
Lokasi: Chantilly, France

Re: Tables in BBCode! Done!

Kirim Dikirim: Fri Oct 23, 2009 9:09 am

Great news! I have 1 client who will be very happy!

Thanks for the nagging. Wink



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback
Site Admin
Site Admin
 
Post: 1229
Sejak: Mar 18, 2006

Re: Tables in BBCode! Updated!

Kirim Dikirim: Fri Oct 23, 2009 10:36 am

FYI, it works in IE 5.5, although much of the CSS displays very poorly. So it seems reasonable to presume that it will also work in IE6 and IE7. I will test at some point, but have to reboot systems, etc., to do so.

I'll have to start pestering you for a hack for Pro News on a different thread when I get a chance!


What's going on? It's been a couple of hours already and no new pestering? Surprised



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback
Site Admin
Site Admin
 
Post: 1229
Sejak: Mar 18, 2006

Re: Tables in BBCode! Updated!

Kirim Dikirim: Thu Jun 23, 2011 2:03 pm

I've followed your formatting here and added strikethrough too. Only thing I can't get right is the mouseover colour - I have an image s1 which has the dark background and s with a light background but it is only s which displays...

Anyhoo, I added these:

Insert in includes/nbbcode.php starting at line 190ish, just after the underline code

PHP:
	var s_help = "'. $bbcode_common['strikethrough'][0].' '.$bbcode_common['strikethrough'][1].'";



Also at line 212ish (after the underline code again)

PHP:
		<img alt="'.$bbcode_common['strikethrough'][0].'" class="bbcbutton" onmouseover="helpline(\''.$form.'\',\''.$field.'\',\'s\')" onclick="BBCcode(\''.$form.'\',\''.$field.'\',this,\'s\')" src="'.$bbbttns_path.'s.gif" />



and around 493 (after underline again - see the pattern here?)

PHP:
		# [i] and [/i] for italicizing text.
$patterns[] = '#\[i\](.*?)\[/i\]#si';
$replacements[] = '<span style="font-style: italic">\\1</span>';



and for completeness, Insert in language/english/bbcode.php starting around line 82 (guess where)

PHP:
	'strikethrough' => array('Strikethrough:','[s]strikethrough[/s]'),



I've added two images to themes\{your_theme}\images\bbcode\.





rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.11/4.1.22/5.2.17/9.3.3.1

rosbif
BetaTester
BetaTester
 
Post: 492
Sejak: Aug 01, 2007
Lokasi: Chantilly, France

Re: Tables in BBCode! Updated!

Kirim Dikirim: Wed Jul 06, 2011 3:27 pm

Hmm ... I found it worked better with the code for strikethrough in your 3rd insert Laughing

[ underline and italic are reversed in the code at this point Wink ]

But my reDesign1/2 icons did flip to green backgrounds.

Below are my attempts at a reDesign3 style ones:


  • s1.gif
  • Description:
  • Filesize: 117 Bytes
  • Viewed: 3175 Time(s)
  • s1.gif

  • s.gif
  • Description:
  • Filesize: 83 Bytes
  • Viewed: 3175 Time(s)
  • s.gif


layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback
Site Admin
Site Admin
 
Post: 1229
Sejak: Mar 18, 2006

Re: Tables in BBCode! Updated!

Kirim Dikirim: Wed Jul 06, 2011 9:39 pm

And to update BBCode FAQ in file language/english/Forums/lang_bbcode.php change line 52 to:

PHP:
$faq[] = array("How to create bold, italic, underlined and strike-through text", "BBCode includes tags to allow you to quickly change the basic style of your text. This is achieved in the following ways: <ul><li>To make a piece of text bold enclose it in <b>[b][/b]</b>, eg. <br /><br /><b>[b]</b>Hello<b>[/b]</b><br /><br />will become <b>Hello</b></li><li>For underlining use <b>[u][/u]</b>, for example:<br /><br /><b>[u]</b>Good Morning<b>[/u]</b><br /><br />becomes <u>Good Morning</u></li><li>To italicise text use <b>[i][/i]</b>, eg.<br /><br />This is <b>[i]</b>Great!<b>[/i]</b><br /><br />would give This is <i>Great!</i></li><li>To strike-through text use <b>[s][/s]</b>, eg.<br /><br />Turn <b>[s]</b>left<b>[/s]</b> right<br /><br />would give Turn <s>left</s> right</li></ul>");



layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.3.0 / 9.2.1

layingback
Site Admin
Site Admin
 
Post: 1229
Sejak: Mar 18, 2006
Link  QR  Share this Versi Cetak  facebook   myspace   twitthis  
Show more ...
Tampilan pesan sebelumnya:   
Kirim balasanKirim balasan Halaman 2 dari 3 Pilih halaman Sebelumnya  1, 2, 3  Selanjutnya

Dragonfly

Navigasi:  



Anda tidak dapat mengirim topik
Anda tidak dapat menjawab topik
Anda tidak dapat mengubah pesan Anda
Anda tidak dapat menghapus pesan Anda
Anda tidak dapat mengikuti polling
You cannot attach files in this forum
You can download files in this forum

Zona waktu menurut GMT






layingback Non-Human Terms of Use