Link to Internal Article from within Editor
- cosmicfantasia
- Joomla! Enthusiast
- Posts: 146
- Joined: Sun Sep 18, 2005 2:18 am
- Contact:
Link to Internal Article from within Editor
Joomla really really needs to have the option of linking to an article without having to first find out what the url is and then manually linking to that url. There should be a list of the articles and perhaps a context search to help find the articles..
Total Web Presence for Good People doing Good Things > cosmicfantasia.net.au
Alternative New and Views for the Progressive Community > cosmicfantasia.com
If you truly love Nature, you will find beauty everywhere - Vincent Van Gogh
Alternative New and Views for the Progressive Community > cosmicfantasia.com
If you truly love Nature, you will find beauty everywhere - Vincent Van Gogh
-
- Joomla! Fledgling
- Posts: 1
- Joined: Sun Nov 11, 2007 8:21 am
Re: Link to Internal Article from within Editor
I second this request.
It's a time consuming trying to figure out what the URL is, especially when it's an article which isn't linked to a menu item already... etc.
(If anyone knows how to do this easily, please post it somewhere.)
It's a time consuming trying to figure out what the URL is, especially when it's an article which isn't linked to a menu item already... etc.
(If anyone knows how to do this easily, please post it somewhere.)
- cosmicfantasia
- Joomla! Enthusiast
- Posts: 146
- Joined: Sun Sep 18, 2005 2:18 am
- Contact:
Re: Link to Internal Article from within Editor
The xhtml suite editor does it but isn't for 1.5 yet. Should be core anyway.
Have heard devs talk about it before for a 1.6 release, but saw this forum and thought to post anyway. Can't hurt.
Have heard devs talk about it before for a 1.6 release, but saw this forum and thought to post anyway. Can't hurt.
Total Web Presence for Good People doing Good Things > cosmicfantasia.net.au
Alternative New and Views for the Progressive Community > cosmicfantasia.com
If you truly love Nature, you will find beauty everywhere - Vincent Van Gogh
Alternative New and Views for the Progressive Community > cosmicfantasia.com
If you truly love Nature, you will find beauty everywhere - Vincent Van Gogh
- Vince
- Joomla! Enthusiast
- Posts: 143
- Joined: Sun Aug 21, 2005 11:41 pm
- Location: UK
- Contact:
Re: Link to Internal Article from within Editor
The core 1.5 already does this now for linking internal articles to a menu.
But I nelieve to do the same witin a page using the editor requires functionality to be built into the editor itself, so not really down to core devs, unless they maintain TinyMCE or another as the default Joomla editor?
It could really do with it for sure.
- Vince
But I nelieve to do the same witin a page using the editor requires functionality to be built into the editor itself, so not really down to core devs, unless they maintain TinyMCE or another as the default Joomla editor?
It could really do with it for sure.
- Vince
www.hostbaron.com - low price Joomla starter packages.
www.SpanishVilla.com - Buy, rent or sell a Spanish property.
www.SpanishVilla.com - Buy, rent or sell a Spanish property.
Re: Link to Internal Article from within Editor
I had the same problem but couldn't find a simple solution to it. So I built a Joomla! extension myself. I don't know if its listed in the extensions area yet, but you can check it out at codes.mtlnews.com.
If you find any bugs or problems, ill be glad to look into it.
Frank
If you find any bugs or problems, ill be glad to look into it.
Frank
- chopstik
- Joomla! Apprentice
- Posts: 9
- Joined: Fri Nov 09, 2007 3:04 am
- Location: New Zealand
- Contact:
Re: Link to Internal Article from within Editor
Hi mtlnews,
Will be a great plugin. I did a fresh install onto Jv1.5 and got the following error when clicking on the "Link Article" button below the content editor. I logged out and back into Administrator. Any ideas?
Will be a great plugin. I did a fresh install onto Jv1.5 and got the following error when clicking on the "Link Article" button below the content editor. I logged out and back into Administrator. Any ideas?
Fatal error: Class 'JModel' not found in /home/kakapo/public_html/administrator/components/com_linkr/models/articles.php on line 11
- Vince
- Joomla! Enthusiast
- Posts: 143
- Joined: Sun Aug 21, 2005 11:41 pm
- Location: UK
- Contact:
Re: Link to Internal Article from within Editor
Hi Frank,mtlnews wrote: I had the same problem but couldn't find a simple solution to it. So I built a Joomla! extension myself. I don't know if its listed in the extensions area yet, but you can check it out at codes.mtlnews.com.
If you find any bugs or problems, ill be glad to look into it.
Frank
This looks great. I especially like the preview part when selecting the article:
http://codes.mtlnews.com/images/stories/ss/linkr/4.png
I will definately give this a whirl soon.
- Vince
www.hostbaron.com - low price Joomla starter packages.
www.SpanishVilla.com - Buy, rent or sell a Spanish property.
www.SpanishVilla.com - Buy, rent or sell a Spanish property.
-
- Joomla! Fledgling
- Posts: 3
- Joined: Mon Jan 28, 2008 5:58 pm
Re: Link to Internal Article from within Editor
Frank,mtlnews wrote: I had the same problem but couldn't find a simple solution to it. So I built a Joomla! extension myself. I don't know if its listed in the extensions area yet, but you can check it out at codes.mtlnews.com.
If you find any bugs or problems, ill be glad to look into it.
Frank
This extension works great! The only problem I've had with it, is it replaces the highlighted text/items instead of making them be the link. So I hacked at it a bit and changed the way it inserts the link. If you leave the text field blank, it will put the a tags around the highlighted text. Quick and Dirty hack, but it works well enough for me, and maybe will give you a good starting point for making this be implemented well.
In the file: administrator/components/com_linkr/assessts/helper.js , I changed the link function:
Code: Select all
link:function(){
t=$('linkText');
u=$('linkURL');
x=$('target');
/*changed by ralig */
if(t.value.length==0){
var inst = window.parent.tinyMCE.selectedInstance;
t.value = inst.selection.getSelectedHTML();
} /*end changed */
if(t.value.length==0){
alert(this.missingText);
t.focus();
- chopstik
- Joomla! Apprentice
- Posts: 9
- Joined: Fri Nov 09, 2007 3:04 am
- Location: New Zealand
- Contact:
Re: Link to Internal Article from within Editor
Hi the mtlnews,
Last error resolved itself. However another crops up when you select an individual article:
// ALL SOLVED. WAS USING 1.5RC3, 1.5 STABLE FIXED ALL PROBS. NICE WORK, GREAT PLUG IN.
Last error resolved itself. However another crops up when you select an individual article:
Any ideas?Fatal error: Class 'JSite' not found in /home/kakapo/public_html/components/com_content/helpers/route.php on line 99
// ALL SOLVED. WAS USING 1.5RC3, 1.5 STABLE FIXED ALL PROBS. NICE WORK, GREAT PLUG IN.
You do not have the required permissions to view the files attached to this post.
Last edited by chopstik on Wed Jan 30, 2008 1:20 am, edited 1 time in total.
Re: Link to Internal Article from within Editor
Thanks ralig!The only problem I've had with it, is it replaces the highlighted text/items instead of making them be the link. So I hacked at it a bit and changed the way it inserts the link. If you leave the text field blank, it will put the a tags around the highlighted text. Quick and Dirty hack, but it works well enough for me, and maybe will give you a good starting point for making this be implemented well.
-
- Joomla! Fledgling
- Posts: 3
- Joined: Mon Jan 28, 2008 5:58 pm
Re: Link to Internal Article from within Editor
OK, 1 problem with the code I gave for putting in the highlighted code: It only works if you have TinyMCE set as your editor (which isn't so bad, since it is the default editor.) If there is a different editor, it makes execution freeze, even in the 1.1.1 update.
I can't seem to find a solution to this. There doesn't seem to be any other joomla editor function wrappers except for jInsertEditorText. It would be nice if there were a jGetEditorSelected, or something of the sort.
I can't seem to find a solution to this. There doesn't seem to be any other joomla editor function wrappers except for jInsertEditorText. It would be nice if there were a jGetEditorSelected, or something of the sort.
Re: Link to Internal Article from within Editor
Your right, there isn't a "jGetEditorSelected". so I made a few changes to the code, and the highlighted code can only be used when editing with tinyMCE. The fact is that xstandard doesn't have a similar function already integrated.
That seems like the last bug. Do you know of any other popular editors I should consider considering?
Heres the new code:
To get the "xstandard" editor, we need to use getElementById(), or mootools' $().
I don't know much javascript, but that seems about right. Works for me anyways.
tell me what you think
That seems like the last bug. Do you know of any other popular editors I should consider considering?
Heres the new code:
Code: Select all
getSelectedText: function()
{
if (window.parent.tinyMCE) {
// Thanks to ralig
var inst=window.parent.tinyMCE.selectedInstance;
txt=inst.selection.getSelectedHTML();
} else if ($('xstandard')!=false) {
txt=''; // There is no way of finding the highlighted text in current version
} else {
txt='';
}
return txt;
}
I don't know much javascript, but that seems about right. Works for me anyways.
tell me what you think
-
- Joomla! Fledgling
- Posts: 3
- Joined: Mon Jan 28, 2008 5:58 pm
Re: Link to Internal Article from within Editor
The new code looks great! That should do the trick nicely.
By looking in the Joomla extension gallery, I found JCE and JoomlaFCK as two popular editors. I know JoomlaFCK is updated for 1.5, but JCE doesn't appear to be yet. I haven't looke dthrough the code or documentation for JoomlaFCK yet, so not sure if it has a function to get the selected text.That seems like the last bug. Do you know of any other popular editors I should consider considering?
Re: Link to Internal Article from within Editor
ill look into joomlaFCK, then ill try to convert the extension to be joomla 1.0.x compatible.
thanks again.
thanks again.
-
- Joomla! Fledgling
- Posts: 1
- Joined: Sat Feb 09, 2008 8:21 pm
Re: Link to Internal Article from within Editor
Hi mtlnews,
I am having problems with Linkr. I installed the component and the plugin on my Joomla! 1.5 site and no errors were reported. I am running my site in legacy mode for compatibility with docman. When I attempt to link to another article from within an article there linkr button is missing. Is there a step or something that I am missing?
Thanks,
Jim
I am having problems with Linkr. I installed the component and the plugin on my Joomla! 1.5 site and no errors were reported. I am running my site in legacy mode for compatibility with docman. When I attempt to link to another article from within an article there linkr button is missing. Is there a step or something that I am missing?
Thanks,
Jim