 |
Account Login
|
 |
 |
Latest Articles
|
 |
 |
IRC Channel
|
 |
 |
Associates
|
 |
 |
Associates
|
 |
|
 |
 |
|
 |
03-11-2008, 11:44 AM
|
#1 (permalink)
|
|
The Frequenter
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
|
Offline Article Editor for Windows (v1.1)
Hi all,
Update: Version 1.1 released - see this post for details.
I knocked this together to help me write my articles as I got fed up with typing BBCode tags manually but figured it might be useful to others
It's nothing fancy, just a Windows text editor that helps you out with a handful of buttons for inserting BBCode tags.
It's written in C# 2008 so requires the .Net Framework 3.5 to run and I've only tested it on Windows Vista so it may or may not work with XP / 2000
Big Important Note! This tool is provided as-is. That means that if it does go terribly wrong and delete all your files or turn your computer into a fireball, I accept no responsibility - you use this tool at your own risk
Some tips: If you click a BBCode button with no text selected it will insert the tags at the current cursor position then put the cursor between the tags. If you click a BBCode button with some text selected it will wrap the text with the tags then place the cursor after the closing tag.
Installation: Unzip the .exe file
Screenshots: (sorry, there really isn't that much to see  )
If you notice any bugs, please let me know.
Thanks,
Alan
(Note: A couple of the icons in this program are from famfamfam.com: Silk Icons)
Last edited by Alan @ CIT : 03-12-2008 at 07:42 PM.
|
|
|
03-11-2008, 01:46 PM
|
#2 (permalink)
|
|
The Acquainted
Join Date: Jan 2008
Posts: 136
Thanks: 4
|
Wow Alan!
I can confirm this works on Windows XP Pro.
This is amazing! Is C# difficult to learn? What programs are needed to make something like this?
Next thing to do (its only a suggestion) is to add a preview option now :)
Edit: Just noticed it does not support tabs or control -a :(
Gareth
|
|
|
|
03-11-2008, 02:05 PM
|
#3 (permalink)
|
|
The Frequenter
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
|
As a workaround for CTRL-A, you can right-click -> Select All. I'll add the shortcut in a future version
Good catch on the tab, I copy/paste code from Zend Studio into Article Writer so I never have to use the tab key  Will also be fixed in the future.
Alan
|
|
|
03-11-2008, 03:49 PM
|
#4 (permalink)
|
|
how quixotic are you?
Join Date: Dec 2007
Location: Lapeer, MI
Posts: 445
Thanks: 37
|
This is cool! Good job! 
|
|
|
|
03-11-2008, 03:57 PM
|
#5 (permalink)
|
|
La Vida es Sueño
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
|
There should also be a preview  !
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
|
|
|
03-11-2008, 04:06 PM
|
#6 (permalink)
|
|
The Frequenter
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
|
At some point I'll knock together v2 with a code/wysiwyg editor view. I wouldn't hold your breath for it though, I'm like a magpie, I get distracted by shiney things (or new program ideas in coding terms)
Alan
|
|
|
03-11-2008, 07:34 PM
|
#7 (permalink)
|
|
La Vida es Sueño
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
|
Well, how about a simple preview button that parses all the BB code into HTML, and then fires up your default web browser. That would be easier!
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
|
|
|
03-11-2008, 07:37 PM
|
#8 (permalink)
|
|
The Contributor
Join Date: Feb 2008
Location: Croatia
Posts: 90
Thanks: 4
|
nice program :) *thumbs up*
__________________
Back from sysadmins to the programmers.
|
|
|
03-11-2008, 07:41 PM
|
#9 (permalink)
|
|
The Frequenter
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
|
Quote:
Originally Posted by Wildhoney
Well, how about a simple preview button that parses all the BB code into HTML, and then fires up your default web browser. That would be easier!
|
Bah, you seen the size of BBCode parsers nowadays?  That is a good idea though, I'll put something together this week
Alan
|
|
|
03-12-2008, 01:01 PM
|
#10 (permalink)
|
|
The Frequenter
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
|
Version 1.1 Released!
Version 1.1 released
Download here: http://www.talkphp.com/attachments/l...riter-v1.1.zip
------
Bug fixes:
* You can now use the Tab key in the text editor (thanks Gareth)
* Ctrl-A now selects all text in the editor (thanks Gareth)
New features:
* Preview button! It uses the default web browser to launch a local preview of the article (thanks Wildhoney and Gareth)
------
Note about the preview function - it's not the most bulletproof bbcode parser in the world but should give you a general idea of what your article will look like on TalkPHP  It currently supports the font, size, bold, italic, underline, php, code, sql and inline tags.
Screenshots of the new preview mode:
This:
Turns into:
The same note in my first post still applies - this program works fine as far as I know but you use it at your own risk - if it melts your computer, I accept no responsibility
Any bugs, please let me know.
Alan
Last edited by Alan @ CIT : 03-12-2008 at 07:30 PM.
|
|
|
|
The Following 2 Users Say Thank You to Alan @ CIT For This Useful Post:
|
|
03-12-2008, 01:25 PM
|
#11 (permalink)
|
|
The Acquainted
Join Date: Nov 2007
Posts: 154
Thanks: 31
|
Editor works nicely, but the preview feature isn't working for me. The page opens in the default browser (FireFox) but the [ code ] tags aren't parsed.
Vista Home Premium, FF 2.0.0.12
__________________
I reject your reality, and substitute my own.
|
|
|
|
03-12-2008, 01:29 PM
|
#12 (permalink)
|
|
The Frequenter
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
|
Hi Sock,
Can you paste the block of text that has your [code][/code] tags in?
Also, are the PHP/SQL blocks displaying ok?
Alan
|
|
|
03-12-2008, 01:34 PM
|
#13 (permalink)
|
|
The Acquainted
Join Date: Jan 2008
Posts: 136
Thanks: 4
|
Everything works as it should do on XP Pro.
Great work, Alan, it really is amazing! And you updated it so quickly as well! Good on you! I will continue to test it out soon :)
|
|
|
|
03-12-2008, 06:54 PM
|
#14 (permalink)
|
|
The Acquainted
Join Date: Nov 2007
Posts: 154
Thanks: 31
|
Quote:
Originally Posted by Alan @ CIT
Can you paste the block of text that has your [code][/code] tags in?
Also, are the PHP/SQL blocks displaying ok?
|
No, the SQL / CODE / PHP blocks to not display properly. When the page is loaded in the browser, I get something to the effects of
Quote:
[SQL]
SELECT
SomeColumn
, (
SELECT COUNT(*) FROM OtherTable
WHERE OtherTable.FK = ThisTable.PK
) AS OTCountValue
FROM ThisTable
ORDER BY SomeColumn
[/SQL]
|
CODE tags do the same, and PHP tags don't display anything. A look at the HTML source reveals what appears to be a properly formatted HTML document with breaks and a DIV container for the entire block of code. The HTML source also shows the PHP code within the tags as if it were a comment; it's there in the source, but it's italicized.
I've also used the bbtag buttons vs. typing the bbtags in by hand, no difference.
Also, doesn't matter whether I save the file first or not.
I've tested this on my laptop running Vista Home Premium && Firefox, and just now on XP Pro with the same version of Firefox. May be something to do with having FF as the default browser? Or the version of .NET installed on these machines? I do have Visual C++ 2008 on both machines, if that makes a difference.
Thanks Alan.
__________________
I reject your reality, and substitute my own.
|
|
|
|
|
The Following User Says Thank You to SOCK For This Useful Post:
|
|
03-12-2008, 07:12 PM
|
#15 (permalink)
|
|
The Frequenter
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
|
Hi Sock,
That's... odd... to say the least  Thankfully, I can replicate the problem. Seems that somewhere along the line I managed to break multiline bbcode support.
Can you try a single line test for me? Something like: [php]echo "test";[/php] and see if that previews ok?
Thanks,
Alan
|
|
|
03-12-2008, 07:21 PM
|
#16 (permalink)
|
|
The Acquainted
Join Date: Jan 2008
Posts: 136
Thanks: 4
|
I don't know if this helps, but I have exactly the same configuration / programs / set up as SOCK does on his laptop
XP Pro
Firefox 2.0.0.12 (default browser)
C++/# 2008
It works fine for me.
|
|
|
|
|
The Following User Says Thank You to Gareth For This Useful Post:
|
|
03-12-2008, 07:32 PM
|
#17 (permalink)
|
|
The Frequenter
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
|
Problem resolved
I've updated the attachments in this thread with the fixed version (still v1.1) or you can grab it here: http://www.talkphp.com/attachments/l...riter-v1.1.zip
My own fault, I removed the singleline regex option when I was playing with case insensitivity
Alan
|
|
|
|
The Following User Says Thank You to Alan @ CIT For This Useful Post:
|
|
03-13-2008, 05:35 AM
|
#18 (permalink)
|
|
The Acquainted
Join Date: Nov 2007
Posts: 154
Thanks: 31
|
Alan, thanks for posting a corrected version; that did it. I still can't use an opening or closing PHP tag (i.e. <?php or ?>) but that's not critical.
Thanks for your time, this editor will come in handy!
__________________
I reject your reality, and substitute my own.
|
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|