href= tag in Joomla 2.5 .ini file - href

how can I insert href tag into joomla 2.5 .ini file ? any idea?
I am trying like this:
YOU_ARE_ALREADY_REGISTERED=You alreade registered.<br />Go back http://www.joomla.org

Related

Django: tinymce HTML format

I just installed django-tinymce however when I display the content I'm getting HTML format. How can I fix this?
Something <p>Some <strong>random </strong>text 123 123 123 <strong><br /></strong></p> admin
Use safe filter.
For example:
{{ your_html|safe }}
By default Django template engine escapes HTML to prevent XSS attacks. By using this filter you say the HTML is safe and can be rendered normally.

How to download file from local directory using python

I want to download a file from the local directory when the user clicks on a particular link. How I can do it using python.
Try this on click of link:
location.replace('your_loacal_filepath')
For Example:
location.replace('/files/out.txt')
if you are rendering HTML, then you should read about the HTML download Attribute
Quoting
The download attribute specifies that the target will be downloaded when a user clicks on the hyperlink.
This attribute is only used if the href attribute is set.
else if(currentobj.filename != null){
var xy = '{% static "/documents/dataset/" %}' + currentobj.filename;
alert(xy);
var $tr = $('<tr><td style="padding:5px;"><a href="'+ xy +'"
target="_blank" download>' + currentobj.filename.slice(0,25) +
"....." +'</a></td> </tr>');
$tbl.append($tr);
}
just add download tag along the hyperlink
if you want to specify a specific name for the download file then just mention it like this
<a href="/images/myw3schoolsimage.jpg" download="w3logo">
You can try this.
The download attribute instructs browsers to download a URL instead of navigating to it.
Check out. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#Attributes

display static html asset in jekyll + github pages

I want to add a link to a static html page (which I have created, not hosted anywhere). I added the html file to my images folder (contains the images which are being rendered in my jekyll blog). Then I make a hyperlink to the html files which I just added in the images folder, like this:
<a href=https://raw.githubusercontent.com/USERNAME/USERNAME.github.io/master/images/time.vs.score.html>View plots here</a>
Where username is my github username. This does not open a new html page, instead I just see the plain text of the html file. How can I add static html files are part of the assets? Thanks!
Thats what raw.githubusercontent.com is made returning raw file.Files are returned with Content-Type:text/plain; and then displayed as text by your browser.
You'd better link to github pages published content at https://USERNAME.github.io/images/time.vs.score.html
I found an easy solution using this tool: https://rawgit.com/
just replace:
<a href=https://raw.githubusercontent.com/USERNAME/USERNAME.github.io/master/images/time.vs.score.html>View plots here</a>
with:
<a href=https://cdn.rawgit.com/USERNAME/USERNAME.github.io/master/images/time.vs.score.html>View plots here</a>

Imacros, web page to save to specific folder?

I have this macro for firefox, for web page saving (htm):
VERSION BUILD=7500718 RECORDER=FX
'
'Ask for a name
!VAR1 NoName_Time_{{!NOW:yyyymmdd_hhnnss}}
'
'Save the page
SAVEAS TYPE=CPL C:\Pages FILE={{!VAR1}}
It works OK, htm page is saved and images and css file are saved in created subfolder.
What I want to change is for jpg images and css files to be saved in specified folder such as ’C:\Images’ so that htm page can find them in that folder.
I tried:
SAVEAS TYPE=CPL FOLDER=C:\Pages FILE={{!NOW:yyyymmdd_hhnnss}} TYPE=CPL FOLDER=C:\Images
But I got error:
wrong format of SAVEAS command, line 5 (Error code: 910)
Any solution?
SAVEAS TYPE=CPL FOLDER=C:\Pages FILE={{!VAR1}}

How to retrieve Sitecore media items from media url?

How to retrieve Sitecore media item from the URL we have?
The URL is dynamic URL e.g. /~/media/14BDED00E4D64DFD8F74019AED4D74EB.ashx.
This is generated when you add item in rich text field.
You can use the code below:
DynamicLink dynamicLink;
if (!DynamicLink.TryParse("/~/media/14BDED00E4D64DFD8F74019AED4D74EB.ashx", out dynamicLink))
return;
MediaItem mediaItem = Sitecore.Context.Database.GetItem(dynamicLink.ItemId, dynamicLink.Language ?? Sitecore.Context.Language);
When adding an item in the Rich Text field, you can use the FieldRenderer to render out the output - Sitecore will then create the correct URL automatically. That way you won't even have to worry about the URL.
The FieldRenderer control can be used like so:
<sc:FieldRenderer ID="renderer" runat="server" FieldName="fieldname" />
Or if you're using XSLT:
<sc:text field="fieldname" />
In codebehind you could do something like
FieldRenderer.Render(Sitecore.Context.Item, fieldname);