syntax highlight in redmine - redmine

The most Users which use redmine, are programmers.
They need the code highlight syntax very, very often which is.
< pre >< code class="LANGUAGE_NAME" >
Some Code
< /code>< /pre>
In order to write less, as an editor in the redmine wiki
I want to be able to press a button or a dropdown field, which surrounds my selected text (like bold, italic, underlined, pre, h1, h2 and so on which already does.)
Maybe someone can suggest a plugin if that exists.
Or shows me the code where the editor happens, so I can implement and provide it as plugin.
Many, many, thanks

I made a plugin which provides this functionality:
https://github.com/mediatainment/redmine_codebutton/
Hope this helps someone, till redmine implements it by default.

There is a "PRE" button in the Redmine Wiki toolbar, which partially does, what you want. I.e., it surrounds the code with just <pre>. At least, you will be able to use this button as a sample...
I'm not aware of any plugin, which comes with the button, you request...
Redmine lets you add any button to the Wiki toolbar. For this you just need to add an element to jsToolBar.prototype.elements as follows:
jsToolBar.prototype.elements.ruby = {
type: 'button',
title: 'Ruby code',
fn: {
wiki: function() { /* handle it here */ this.encloseLineSelection('<pre><code class="ruby">\n', '\n</code></pre>') }
}
};
See also: javascripts/jstoolbar/textile.js.

If someone is still have that problem I recently uploaded redmine plugin that replaces built-in coderay with highlightJS. Plugin feature much more markups, very good language autodetection as well as dual language highlighting (i.e http+json in body). Plugin url is:
https://github.com/dominch/redmine_highlightjs
Language autodetection works great, so probably You will no longer need to input specific language class. Plugin takes care about that and just work!

Related

Track down where content comes from

Being new to Joomla I do not know all the tricks for troubleshooting etc. Currently I have a page that has a section of content on it. The content is created by DT Register but I've been through the CP several times and cannot find the section?
I hope someone is up and can share with me how to track down where pieces of content come from so I can find where this is being generated and change as needed.
The page in question is a DT Register form. I can locate and modify every section of the page EXCEPT one.
The section is titled USER INFORMATION and captures userid & password to create an account. Looking at the element in developer tools it would appear it is part of the dt register generated code but as I mentioned I can't find it.
The sandbox I am playing in is here: http://take7.lamplighterguild.com/index.php/register?eventId=15&controller=event&task=individualRegister
The section is towards the top and is hard to read on the page...which is why I want to find it.
Thank you for any help or direction.
So unfortunately my question was poorly worded. I have no trouble at all getting the css changed. It is the origin of the content that I am really trying to track down. Where does it come from etc. Is there a way to detect if it came from an article, or a component, etc. I thought there might be clues as how to figure that out.
For troubleshooting issues like this, tools like Firebug or Web Inspector for Chrome and Safari are your go to tools. If you aren't already familiar with them you'll find lots of help online.
There is default body text styling of colour #D9A362 getting into your page from one of the stylesheets. I can't find the source quickly myself, though it's easy enough to write an override.
One place you could do this is open http://take7.lamplighterguild.com/templates/theme1001/css/template.css with a text editor. Below the existing body rule # line 7, add something like
body.cssstyle-style1{
color:black;
}
This will fix the H2 text at the top of the page which you mention, plus the 'user information' line immeadiately above the form.
Hope this helps!
EDIT
You have something which is writing the following style to your page head and this is the culprit:
body {font-family:Arial, Helvetica, sans-serif; font-size:13px; line-height:21px; color:#D9A362; }
It's even on your home page so it's not necesaarily related to DT Register. To me it looks like it's coming from your menu extension.

Content reuse in Sitecore 7

Currently working in SC7 where I have implemented a kind of scaffolding so that editors can add an article to a page and add sections and paragraphs under it. You get the idea, html5 stuff...
Now, the problem...
Editors are working in Page Editor:
Suppose you make a new page, and add an article. It has a title, hero image on top and an introduction. You choose to create new content and I save it in an ItemBucket called ContenStore where I store all my articles, sections, paragraphs... The SC7 way to use the search if they want to re-use any of that content.
Suppose my editor creates another new page, and he wants to re-use a section from the content store. He will find the section but when he has placed it on the page, non of the paragraphs that were on the original section show up... Of course not, since I guess the layout details are saved on the context item level and not on that section level...
Has anyone tackled this problem before? A sublayout (or rendering) should be able to remeber what layout details it has, so that if you re-use it, all the items it had originally are put in its placeholders again as well, and this recursively of course...
Any thoughts welcome...
Erwin
The problem you describe is not new to Sitecore 7. You would have the same problem in Sitecore 6, you would just have to go through the additional effort of keeping your content organized. This is a fundamental limitation of Sitecore's presentation framework.
I have worked around similar problems before by using Presentation Inversion of Control. (I should probably write an update for that since the rules engine approach no longer works)
I believe that Cognifide is doing something similar with the "Composites" in their Zen Garden, but instead of using a dummy layout they use an empty layout so any item can be opened as a page. Then they added a custom experience button which navigates to that non-page content item within the page editor. (Note that this is speculation based on a brief demo that I saw).
Thomas Eldblom also blogged years ago about what he called Composite Layouts. It's similar to PIoC, but puts the presentation settings on a special rendering type.
In short, there are ways to achieve what you want, but they all involve custom development and will require extra attention to maintain a smooth page editor experience.

Are workflow comments customizable?

Does anyone know of any way to customise the Workflow Comments box that appears in Sitecore if you enable the "comments" option?
I'm looking to extend this a little ... but can't see this referenced in any sitecore javascript or shell files - I'm guessing I will need to build a custom dialog in its entirety to implement the functionality I want, but not 100% where to start!
We ended up putting a solution in place that, broadly, composes of a custom action, containing the relevant form that we need. The information that the user submitted was then parsed, and passed to the workflow as comments (this particular workflow command was hidden from users, so they had to go through our custom one).
Not ideal, but works!

Joomla module display

I want to create a page in Joomla that displays only one specified module on a page and nothing more. I was trying to insert module in an article but it's not working because plugins are also adding content to an article, and I don't want to turn them off. MAybe I should create a template with a new position, and override default template on that specific page but maybe there's a better solution. Any ideas?
Joomla is coded to either expect an article or the output of a component on every page. I don't completely understand why you can't just insert a blank article with the {loadposition module_position} code unless your plugins are automatically generating content for articles. I'm used to plugins that only work when their plugin code is added to an article. Anyway, assuming that your plugins are automatically adding content to your Joomla articles, then the simple solution might be to add a new component like Zoo and use the "Pages" app to create a blank/no-title item that contains the {loadposition xx} code, then link your menu item to that Zoo item.
Have you checked the parameters of the article? Those should allow you to turn off the title, author, icons, date, and other elements that may be appearing.
I think it can be possible by this condition in index.php
countModules('condition')) { ?>
do something
do something else
you can put what you want in this module and according to this condtion you have to only insert module name in countModules('your module Name') followed by bhe code in the braces. and for rest of pages you can put your code in the else part.

Standalone jQuery or MooTools version of YooTools YOOcarousel

I was wondering if anyone knows of a jQuery or MooTools script that will do the exact same thing as YOOcarousel (http://tools.yootheme.com/extensions/yoocarousel).
I'm looking to emulate the 'List Styling' setup they have where on the left you have the tabbed navigation and on the right it fades in/out thru each of the tabbed items as they are clicked.
Thanks,
Ryan
iCarousel might work for your purposes (demo and code examples here as well), created by Fabio Zendhi Nagao. The functionality isn't exactly identical (tab based control) to the YooTools Carousel but foundation is there to make it very close to the YooTools offering.
slideItMoo is another alternative- however, it appears to have fewer customized examples and less of a fan base.