This TechArticles module is very similar to the well known articles module. For Cuyahoga V1.6+
I wanted this module to post code snips to my site and have them code highlight quickly and easily.
Features:
- Register jQuery option (if not included in your template)
- Auto code highlighting (requires jQuery, uses [url=http://google-code- prettify.googlecode.com/svn/trunk/README.html]Google Code Prettify[/url])
- RSS feed
- Searchable
- Manage categories
- Manage articles
- Manage article revision history
- Backup article on edit
- Restore articles to previous version
- Backup when restore articles to previous version
- Edit history items and preview before restore
- Enhanced admin UI for smoother quicker edits (jQuery elements)
It is in the contrib. Future version to do:
Separate article listing section (that links to the detail view from elsewhere in site, with different listing options)
Comments.
Email notification of edits.
Compare below with and without
CSS Control Adapters.
Hi John,
I have a try of your module but still not look at its source code. When I run in firefox, there are two javascript errors:
Error: $.widget is not a function
Source File:
http://localhost:8016/Modules/TechArticles/JavaScript/ui.accordion.js
Line: 362
Error: acc1.accordion is not a function
Source File:
http://localhost:8016/Modules/TechArticles/JavaScript/admintecharticles.js
Line: 40
And I click link button "+Add Article Content", nothing has change.
Does it belong my framework version or something still was wrong in module?
I have just got the latest Cuyhoga 1.6 from the repository. I just tested this and it works fine :) A few things to note.
Then I got the module from the contrib Cuyahoga.Modules.TechArticles here:
https://cuyahogacontrib.svn.sourceforge.net/svnroot/cuyahogacontrib/Cuyahoga.Modules.TechArticles/tags
Note that it is in the 'tags' folder. The trunk is built with my Cuyahoga V2.0 version, so do not use otherwise you may need to fix things.
When using the module these options (in Edit section: Custom settings)...
[ ] * Register jQuery (yes if not in template)
[ ] ** Auto code highlighting (requires jQuery)
...both need to be checked for auto code highlighting to work.
When you add some code into the editor, you must select the code block (click and drag range select) and in the fckEditor 'style' dropdown apply the 'Highlight Auto' style to it. This will auto highlight a variety of codes in different styles (C#, XHTML, CSS, C++, VB more...)
There are no javascript errors I can see in Explorer or Firefox. All I can say is use the version for Cuyahoga v1.6 in the tags folder and the latest Cuyahoga 1.6. This works.
Also when you edit the HTML of an article the editor is displayed in a modal window. When you have finished the editing and close the editor, you must press the 'Update' button in the gridview row you are editing to save the changes.
I would also add CSS Control Adapters to the build, it makes the admin a lot clearer to view and use. I have just tested it here without CSS Control Adapters and although it works, it was not as clear. It takes less than a minute to do.
There seems to be an issue with the 1.6 tag version in the repo
RegisterJavascript
Should be
RegisterJavaScript
RabidDogThere seems to be an issue with the 1.6 tag version in the repo
RegisterJavascript
Should be
RegisterJavaScript
This is a known. I did submit a patch to change the naming of the register methods but it was not used. The latest V1.6 Cuyahoga version and the latest V1.6 of the module should have no issues. 'RegisterJavascript' is used in Cuyahoga. I will check again though. Thanks.
Edit section
An error occured: Object reference not set to an instance of an object.
hawnkEdit section
An error occured: Object reference not set to an instance of an object.
What version of Cuyahoga are you using?
What version of Module are you using? (URL of source)
Cuyahoga version 1.6.0
Modules list
StaticHtml Cuyahoga.Modules Active Installed (1.6.0)
User Cuyahoga.Modules Active Installed (1.6.0)
Search Cuyahoga.Modules Active Installed (1.6.0)
LanguageSwitcher Cuyahoga.Modules Active Installed (1.6.0)
UserProfile Cuyahoga.Modules Active Installed (1.6.0)
SearchInput Cuyahoga.Modules Active Installed (1.6.0)
Sitemap Cuyahoga.Modules Active Installed (1.6.0)
Articles Cuyahoga.Modules.Articles Active Installed (1.5.2) Uninstall
Downloads Cuyahoga.Modules.Downloads Active Installed (1.5.2) Uninstall
Flash Cuyahoga.Modules.Flash Active Installed (1.5.1) Uninstall
Forum Cuyahoga.Modules.Forum Active Installed (1.5.2) Uninstall
RemoteContent Cuyahoga.Modules.RemoteContent Active Installed (1.5.1) Uninstall
ContactUs Cuyahoga.Modules.ContactUs Active Installed (1.5.0) Uninstall
Feedback Cuyahoga.Modules.Feedback Not Active Installed (1.5.0) Uninstall *
TechArticles Cuyahoga.Modules.TechArticles Not Active Installed (1.6.0) Uninstall *
Mailer Cuyahoga.Modules.Mailer Not Active Installed (1.5.2) Uninstall *
* For, Activeding "An error occured: Object reference not set to an instance of an object." show error.
There is a post (above) in this thread that deals with this I think.
I have just got the latest Cuyhoga 1.6 from the repository. I just tested this and it works fine A few things to note.
Then I got the module from the contrib Cuyahoga.Modules.TechArticles here:
Code:
https://cuyahogacontrib.svn.sourceforge.net/svnroot/cuyahogacontrib/Cuyahoga.Modules.TechArticles/tags
Note that it is in the 'tags' folder. The trunk is built with my Cuyahoga V2.0 version, so do not use otherwise you may need to fix things.
Do not use the trunk version of the module as it is built against a custom Cuyahoga. I may remove it.
Hi,
I compiled my project, including whether the place of the following error message but still gives the same.
hawnkHi,
I compiled my project, including whether the place of the following error message but still gives the same.
I've just found out the problem: the Hashtable doesn't add key/value like expected order of our code:
//Add Admin Page Specific Javascript to page
RegisterAdminJavascript(
"jQuery", UrlHelper.GetApplicationPath() + "Modules/TechArticles/JavaScript/jquery-1.3.2.min.js");
RegisterAdminJavascript(
"jQueryCookie", UrlHelper.GetApplicationPath() + "Modules/TechArticles/JavaScript/jquery.cookie.js");
RegisterAdminJavascript(
"uiCore", UrlHelper.GetApplicationPath() + "Modules/TechArticles/JavaScript/ui.core.js");
RegisterAdminJavascript(
"uiAccordion", UrlHelper.GetApplicationPath() + "Modules/TechArticles/JavaScript/ui.accordion.js");
RegisterAdminJavascript(
"admintecharticles", UrlHelper.GetApplicationPath() + "Modules/TechArticles/JavaScript/admintecharticles.js");
compared with keys added to the Hashtable:
- this._javascripts Count = 5 System.Collections.IDictionary {System.Collections.Hashtable}
+[
"jQuery"] "/Cuyahoga/Modules/TechArticles/JavaScript/jquery-1.3.2.min.js"
+[
"uiAccordion"] "/Cuyahoga/Modules/TechArticles/JavaScript/ui.accordion.js"
+[
"jQueryCookie"] "/Cuyahoga/Modules/TechArticles/JavaScript/jquery.cookie.js"
+[
"uiCore"] "/Cuyahoga/Modules/TechArticles/JavaScript/ui.core.js"
+[
"admintecharticles"] "/Cuyahoga/Modules/TechArticles/JavaScript/admintecharticles.js"
And, my solution is replacing Hastable with
OrderedDictionary in
BasePageControl.cs like:
public BasePageControl()
{
this._stylesheets = new Hashtable();
this._javascripts = new OrderedDictionary(); // Hashtable();
}
These patches have already been
submitted by myself and applied to the V1.6 on 03/06/09.
When creating the modules I found various things that I required to build them. The first one was the ability to register JavaScripts and CSS from modules/module admins. Then was the order critical JavaScript fix etc...
Revision: 813
Author: martijn_b
Date: 12:40:26, 03 June 2009
Message:
CUY-158 applied patch from John Lynch
- ordering javascripts and stylesheets
- generating complete rss links is now the responsibility of the module
----
Modified : /branches/1.6.x/Cuyahoga.Modules.Articles/ArticleModule.cs
Modified : /branches/1.6.x/Web/Rss.aspx.cs
Modified : /branches/1.6.x/Web/UI/BaseModuleControl.cs
Modified : /branches/1.6.x/Web/UI/BasePageControl.cs
Also there has been another change committed:
Revision: 879
Author: martijn_b
Date: 13:34:35, 25 August 2009
Message:
Actually redirect to external link when a node is requested that points to an external link.
----
Modified : /branches/1.6.x/Web/UI/PageEngine.cs
I have the repository checked out locally so as always to have the latest version. It is always good to get the latest src ;)