TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 03-11-2008, 11:44 AM   #1 (permalink)
Alan @ CIT
Member of the Month
The Frequenter
Member of the Month Top Contributor 
 
Alan @ CIT's Avatar
 
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
Alan @ CIT is on a distinguished road
Bricks 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)
Attached Files
File Type: zip Article Writer v1.1.zip (113.8 KB, 14 views)

Last edited by Alan @ CIT : 03-12-2008 at 07:42 PM.
Send a message via MSN to Alan @ CIT
Alan @ CIT is offline  
Reply With Quote
Old 03-11-2008, 01:46 PM   #2 (permalink)
The Acquainted
 
Gareth's Avatar
 
Join Date: Jan 2008
Posts: 136
Thanks: 4
Gareth is on a distinguished road
Default

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
Gareth is offline  
Reply With Quote
Old 03-11-2008, 02:05 PM   #3 (permalink)
Alan @ CIT
Member of the Month
The Frequenter
Member of the Month Top Contributor 
 
Alan @ CIT's Avatar
 
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
Alan @ CIT is on a distinguished road
Default

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
Send a message via MSN to Alan @ CIT
Alan @ CIT is offline  
Reply With Quote
Old 03-11-2008, 03:49 PM   #4 (permalink)
how quixotic are you?
 
ETbyrne's Avatar
 
Join Date: Dec 2007
Location: Lapeer, MI
Posts: 445
Thanks: 37
ETbyrne is on a distinguished road
Default

This is cool! Good job!
__________________
Dingo Web Systems > http://www.dingocode.com
My Website > http://www.evanbot.com
ETbyrne is offline  
Reply With Quote
Old 03-11-2008, 03:57 PM   #5 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

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.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
Old 03-11-2008, 04:06 PM   #6 (permalink)
Alan @ CIT
Member of the Month
The Frequenter
Member of the Month Top Contributor 
 
Alan @ CIT's Avatar
 
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
Alan @ CIT is on a distinguished road
Default

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
Send a message via MSN to Alan @ CIT
Alan @ CIT is offline  
Reply With Quote
Old 03-11-2008, 07:34 PM   #7 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

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.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
Old 03-11-2008, 07:37 PM   #8 (permalink)
The Contributor
 
abiko's Avatar
 
Join Date: Feb 2008
Location: Croatia
Posts: 90
Thanks: 4
abiko is on a distinguished road
Default

nice program :) *thumbs up*
__________________
Back from sysadmins to the programmers.
Send a message via ICQ to abiko Send a message via MSN to abiko
abiko is offline  
Reply With Quote
Old 03-11-2008, 07:41 PM   #9 (permalink)
Alan @ CIT
Member of the Month
The Frequenter
Member of the Month Top Contributor 
 
Alan @ CIT's Avatar
 
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
Alan @ CIT is on a distinguished road
Default

Quote:
Originally Posted by Wildhoney View Post
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
Send a message via MSN to Alan @ CIT
Alan @ CIT is offline  
Reply With Quote
Old 03-12-2008, 01:01 PM   #10 (permalink)
Alan @ CIT
Member of the Month
The Frequenter
Member of the Month Top Contributor 
 
Alan @ CIT's Avatar
 
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
Alan @ CIT is on a distinguished road
Application Go 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.
Send a message via MSN to Alan @ CIT
Alan @ CIT is offline  
Reply With Quote
The Following 2 Users Say Thank You to Alan @ CIT For This Useful Post:
freenity (03-12-2008), SOCK (03-12-2008)
Old 03-12-2008, 01:25 PM   #11 (permalink)
The Acquainted
 
Join Date: Nov 2007
Posts: 154
Thanks: 31
SOCK is on a distinguished road
Default

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.
SOCK is offline  
Reply With Quote
Old 03-12-2008, 01:29 PM   #12 (permalink)
Alan @ CIT
Member of the Month
The Frequenter
Member of the Month Top Contributor 
 
Alan @ CIT's Avatar
 
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
Alan @ CIT is on a distinguished road
Default

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
Send a message via MSN to Alan @ CIT
Alan @ CIT is offline  
Reply With Quote
Old 03-12-2008, 01:34 PM   #13 (permalink)
The Acquainted
 
Gareth's Avatar
 
Join Date: Jan 2008
Posts: 136
Thanks: 4
Gareth is on a distinguished road
Default

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 :)
Gareth is offline  
Reply With Quote
Old 03-12-2008, 06:54 PM   #14 (permalink)
The Acquainted
 
Join Date: Nov 2007
Posts: 154
Thanks: 31
SOCK is on a distinguished road
Default

Quote:
Originally Posted by Alan @ CIT View Post
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.
SOCK is offline  
Reply With Quote
The Following User Says Thank You to SOCK For This Useful Post:
Alan @ CIT (03-12-2008)
Old 03-12-2008, 07:12 PM   #15 (permalink)
Alan @ CIT
Member of the Month
The Frequenter
Member of the Month Top Contributor 
 
Alan @ CIT's Avatar
 
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
Alan @ CIT is on a distinguished road
Default

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
Send a message via MSN to Alan @ CIT
Alan @ CIT is offline  
Reply With Quote
Old 03-12-2008, 07:21 PM   #16 (permalink)
The Acquainted
 
Gareth's Avatar
 
Join Date: Jan 2008
Posts: 136
Thanks: 4
Gareth is on a distinguished road
Default

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.
Gareth is offline  
Reply With Quote
The Following User Says Thank You to Gareth For This Useful Post:
Alan @ CIT (03-12-2008)
Old 03-12-2008, 07:32 PM   #17 (permalink)
Alan @ CIT
Member of the Month
The Frequenter
Member of the Month Top Contributor 
 
Alan @ CIT's Avatar
 
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
Alan @ CIT is on a distinguished road
Default

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
Send a message via MSN to Alan @ CIT
Alan @ CIT is offline  
Reply With Quote
The Following User Says Thank You to Alan @ CIT For This Useful Post:
SOCK (03-13-2008)
Old 03-13-2008, 05:35 AM   #18 (permalink)
The Acquainted
 
Join Date: Nov 2007
Posts: 154
Thanks: 31
SOCK is on a distinguished road
Default

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.
SOCK is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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


All times are GMT. The time now is 07:13 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design