Keyword

At last, a working JCE Advanced Link plugin for K2 content items

  • Nicholas K. Dionysopoulos
  • Nicholas K. Dionysopoulos's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 7 months ago #74941 by Nicholas K. Dionysopoulos
Replied by Nicholas K. Dionysopoulos on topic At last, a working JCE Advanced Link plugin for K2 content items
Do note that the menu item editor allows you to override article parameters and set menu-specific parameters. What you are doing wrong here is that you're using the wrong link type in JCE. The K2 AdvLink plugins makes links to arbitrary articles. What you should have done is create a link to a specific menu item using the "Menu" item in AdvLink's pane.

By the way, it's not simply called "page suffix". What you really mean is "page class suffix" which is a CSS-level trick on styling pages. It is a completely different thing than the plain "page suffix" which refers to the extension of the SEF URL ;)

Nik Ovvadias said:Something like that… To be more specific, I have lets say a K2 page with a suffix (made by the page-suffix on the menu properties) which contains some links, lets call it “CONTENT_PAGE”. These links are produced with the adv-Link linking to k2 pages with NO SUFFIX what so ever. The result is that the new pages for some reason get the suffix from the CONTENT_PAGE altering its style…While trying to hack this I realized that also the URL produced with adv-Link was different from the original. A way to overcome this problem I found was to add ”:linkpage title” after the URL produced by adv-Link inside the panel (if that makes any sense).
Nicholas K. Dionysopoulos said:I'm not sure I understand what you mean. If I get this correctly, you have SEF URLs with no suffix and using AdvLink produces URLs with an .html suffix? Or is it something else? Nik Ovvadias said:Hi Nik, first of all I have to thank you for creating this plug-in, and uploading it for everyone to use. Unfortunately I’m having some problems using it the way I want. When using advanced link to create a link to a k2 item, the suffix of the page containing the link, is passed to the target K2 item distorting the style…. Does anyone has a clue what might be the problem? I’m using K2 v2.1….

Please Log in or Create an account to join the conversation.

More
14 years 7 months ago #74942 by Nik Ovvadias
That is exactly my case. The articles (k2 items) are not already linked to a menu item, that is why I use the content page to link to that. Sorry for the “page suffix”, I’m new at joomla. Since, from what I see you are greek, I can send you a post in greek? (my English is poor)

Nicholas K. Dionysopoulos said:Do note that the menu item editor allows you to override article parameters and set menu-specific parameters. What you are doing wrong here is that you're using the wrong link type in JCE. The K2 AdvLink plugins makes links to arbitrary articles. What you should have done is create a link to a specific menu item using the "Menu" item in AdvLink's pane.
By the way, it's not simply called "page suffix". What you really mean is "page class suffix" which is a CSS-level trick on styling pages. It is a completely different thing than the plain "page suffix" which refers to the extension of the SEF URL ;)

Nik Ovvadias said:Something like that… To be more specific, I have lets say a K2 page with a suffix (made by the page-suffix on the menu properties) which contains some links, lets call it “CONTENT_PAGE”. These links are produced with the adv-Link linking to k2 pages with NO SUFFIX what so ever. The result is that the new pages for some reason get the suffix from the CONTENT_PAGE altering its style…While trying to hack this I realized that also the URL produced with adv-Link was different from the original. A way to overcome this problem I found was to add ”:linkpage title” after the URL produced by adv-Link inside the panel (if that makes any sense). Nicholas K. Dionysopoulos said:I'm not sure I understand what you mean. If I get this correctly, you have SEF URLs with no suffix and using AdvLink produces URLs with an .html suffix? Or is it something else? Nik Ovvadias said:Hi Nik, first of all I have to thank you for creating this plug-in, and uploading it for everyone to use. Unfortunately I’m having some problems using it the way I want. When using advanced link to create a link to a k2 item, the suffix of the page containing the link, is passed to the target K2 item distorting the style…. Does anyone has a clue what might be the problem? I’m using K2 v2.1….

Please Log in or Create an account to join the conversation.

  • Nicholas K. Dionysopoulos
  • Nicholas K. Dionysopoulos's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 7 months ago #74943 by Nicholas K. Dionysopoulos
Replied by Nicholas K. Dionysopoulos on topic At last, a working JCE Advanced Link plugin for K2 content items
If your content items belong to a category linked in a menu, K2's router - used by my AdvLink plug-in to determine the URL to the article - should pick it up and I think apply the class suffix as well. That's the theory, I haven't really tested it.

That's the executive summary for the rest of the non-Greeks here to understand what makes my plug-in tick. You can send me a post in Greek, of course, so that I can answer more of your questions more precisely :)

Please Log in or Create an account to join the conversation.

More
14 years 7 months ago #74944 by Nik Ovvadias
Αυτό που συμβαίνει είναι ότι εφαρμόζει το class suffix των περιεχομένων (content) και στις επόμενες σελίδες οι οποίες είναι άσχετες με τα περιεχόμενα και οι οποίες δεν έχουν καμία σύνδεση με το menu. Είναι ουσιαστικά σαν να εμφανίζει το περιεχόμενο των items μέσα στην σελίδα των περιεχομένων, αλλάζοντας βέβαια τίτλους και τα λοιπά. Αυτό που μου έκανε εντύπωση είναι ότι όταν μέσα στο advanced-link pane, και αφού ορίσω το επιθυμητό σύνδεσμο, του προσθέσω στο τέλος του url που εμφανίζει «:τον τίτλο του item» όλα πάνε ρολόι… Το ίδιο συμβαίνει και με το URL. Για παράδειγμα αυτό είναι το url όταν ο χρησιμοποιώ το advanced-link (χωρίς πατέντες) http://127.0.0.1/journal3/index.php?option=com_k2&view=item&id=9&Itemid=16 ενώ
http://127.0.0.1/journal3/index.php?option=com_k2&view=item&id=9:testword&Itemid=15 όταν προσθέτω το «:testword» στο τέλος του url στο advanced_link… Στο τέλος του πρώτου url εμφανίζει Itemid=16 το οποίο είναι ίδιο για όλους τους συνδέσμους που έχω μέσα στα περιεχόμενα…Γιατί; Κάνω εγώ κάτι λάθος ή απλά έτσι είναι στημένο οπότε θα συνεχίσω με αυτήν την πατέντα;


Nicholas K. Dionysopoulos said:If your content items belong to a category linked in a menu, K2's router - used by my AdvLink plug-in to determine the URL to the article - should pick it up and I think apply the class suffix as well. That's the theory, I haven't really tested it.
That's the executive summary for the rest of the non-Greeks here to understand what makes my plug-in tick. You can send me a post in Greek, of course, so that I can answer more of your questions more precisely :)

Please Log in or Create an account to join the conversation.

  • Nicholas K. Dionysopoulos
  • Nicholas K. Dionysopoulos's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 7 months ago #74945 by Nicholas K. Dionysopoulos
Replied by Nicholas K. Dionysopoulos on topic At last, a working JCE Advanced Link plugin for K2 content items
Λοιπόν, το πρόβλημά σου δεν έχει σχέση ούτε με το K2, ούτε με το plug-in, αλλά με τον τρόπο που δουλεύει το Joomla!. Το Itemid καθορίζει από ποίο μενού θα "τραβάει" τις ρυθμίσεις της σελίδας. Επειδή το πρώτο μενού στο οποίο είναι διαθέσιμο το περιεχόμενο είναι το 15, ο router του K2 - εκείνο το κομμάτι του K2 που φτιάχνει το URL για ένα άρθρο - το εντοπίζει και το κοτσάρει στο τέλος του URL. Βάζοντας εσύ το :testitem πάει και βρίσκει το 16. Αν δεν δω πως είναι στημένα τα μανού και το περιεχόμενο δεν μπορώ να σου εξηγήσω 100% γιατί, αλλά η κεντρική ιδέα είναι αυτή.

Παρεμπιπτόντως, προκειμένου το Joomla! να διατηρεί μια συνεπή μορφοποίηση των σελίδων, πάντα προσθέτει το τρέχον Itemid στο τέλος του URL ενός συνδέσμου (link) μέσα σε ένα άρθρο, εκτός κι αν ο σύνδεσμος αναφέρει ένα συγκεκριμένο Itemid. Αν δεν το έκανε, κάθε φορά που θα έκανες link σε ένα άρθρο που δεν είναι άμεσα προσβάσιμο από ένα στοιχείο μενού, θα εξαφανίζονταν όλα τα modules απ'την σελίδα, εκτός από εκείνα που ήταν δημοσιευμένα με την επιλογή "None" για την αντιστοίχισή τους σε μενού.

Όπως σου έγραψα στην αρχική μου απάντηση, καλύτερο είναι να φτιάξεις ένα menu item για την κατηγορία άρθρων του K2 που επιθυμείς να έχουν συγκεκριμένη μορφοποίηση και μάλιστα να έχει id μικρότερο από αυτό της γονικής κατηγορίας (αυτής που περιέχει ΟΛΑ τα άρθρα του site). Με αυτόν τον τρόπο, ο router του K2 θα δίνει το σωστό Itemid σε αυτά τα άρθρα που θες. Γενικά, είναι κακή ιδέα να έχεις το ίδιο περιεχόμενο προσβάσιμο από μενού με διαφορετικό Itemid (δηλαδή οτιδήποτε εκτός από menu items του τύπου menu alias) γιατί καταλήγεις να δημιουργείς διαφορετικά URL για το ίδιο άρθρο. Όταν το σηκώσεις live, το Google θα πιστεύει ότι έχεις διπλότυπο περιεχόμενο και αυτό μπορεί να έχει αρνητικές συνέπειες στην κατάταξη του site σου.

Please Log in or Create an account to join the conversation.

More
14 years 7 months ago #74946 by Nik Ovvadias
Thenx for the reply in Greek Nik. Also thank you for the time you spent trying to explain to me what my problem is, it was very helpful to understand the hole philosophy behind…

Nicholas K. Dionysopoulos said:Λοιπόν, το πρόβλημά σου δεν έχει σχέση ούτε με το K2, ούτε με το plug-in, αλλά με τον τρόπο που δουλεύει το Joomla!. Το Itemid καθορίζει από ποίο μενού θα "τραβάει" τις ρυθμίσεις της σελίδας. Επειδή το πρώτο μενού στο οποίο είναι διαθέσιμο το περιεχόμενο είναι το 15, ο router του K2 - εκείνο το κομμάτι του K2 που φτιάχνει το URL για ένα άρθρο - το εντοπίζει και το κοτσάρει στο τέλος του URL. Βάζοντας εσύ το :testitem πάει και βρίσκει το 16. Αν δεν δω πως είναι στημένα τα μανού και το περιεχόμενο δεν μπορώ να σου εξηγήσω 100% γιατί, αλλά η κεντρική ιδέα είναι αυτή.
Παρεμπιπτόντως, προκειμένου το Joomla! να διατηρεί μια συνεπή μορφοποίηση των σελίδων, πάντα προσθέτει το τρέχον Itemid στο τέλος του URL ενός συνδέσμου (link) μέσα σε ένα άρθρο, εκτός κι αν ο σύνδεσμος αναφέρει ένα συγκεκριμένο Itemid. Αν δεν το έκανε, κάθε φορά που θα έκανες link σε ένα άρθρο που δεν είναι άμεσα προσβάσιμο από ένα στοιχείο μενού, θα εξαφανίζονταν όλα τα modules απ'την σελίδα, εκτός από εκείνα που ήταν δημοσιευμένα με την επιλογή "None" για την αντιστοίχισή τους σε μενού.

Όπως σου έγραψα στην αρχική μου απάντηση, καλύτερο είναι να φτιάξεις ένα menu item για την κατηγορία άρθρων του K2 που επιθυμείς να έχουν συγκεκριμένη μορφοποίηση και μάλιστα να έχει id μικρότερο από αυτό της γονικής κατηγορίας (αυτής που περιέχει ΟΛΑ τα άρθρα του site). Με αυτόν τον τρόπο, ο router του K2 θα δίνει το σωστό Itemid σε αυτά τα άρθρα που θες. Γενικά, είναι κακή ιδέα να έχεις το ίδιο περιεχόμενο προσβάσιμο από μενού με διαφορετικό Itemid (δηλαδή οτιδήποτε εκτός από menu items του τύπου menu alias) γιατί καταλήγεις να δημιουργείς διαφορετικά URL για το ίδιο άρθρο. Όταν το σηκώσεις live, το Google θα πιστεύει ότι έχεις διπλότυπο περιεχόμενο και αυτό μπορεί να έχει αρνητικές συνέπειες στην κατάταξη του site σου.

Please Log in or Create an account to join the conversation.

  • Nicholas K. Dionysopoulos
  • Nicholas K. Dionysopoulos's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 7 months ago #74947 by Nicholas K. Dionysopoulos
Replied by Nicholas K. Dionysopoulos on topic At last, a working JCE Advanced Link plugin for K2 content items
I used to be a newbie once. I remember how hard it was for me to figure out what was going on, when something didn't work as I expected. Now that I know so much more than I did back then, I think sharing my knowledge is the only responsible thing to do :D

Please Log in or Create an account to join the conversation.

More
14 years 7 months ago #74948 by Andrew Gleed
Hello, I am having the issue with the install. I am new to joomla, so just tried installing via the joomla installer like i normally do and received the same error. Where do i find the JCE installer please? Thanks in advance :)

Nicholas K. Dionysopoulos said:Oops! Yes, obviously, it doesn't install using the Joomla! installer, only through the JCE installer as it is an extension to JCE. I thought that was obvious, so I didn't bother to ask. So much for assumptions :D
Matthieu Brunet said:Well actually, it seems I was trying to install it using the joomla installer, and not the JCE installer. I tried today the JCE installer and it worked perfectly. Sorry for the noise ! Nicholas K. Dionysopoulos said:Yes, actually the file should be plugin.php, not extension.php, that was my oversight on my last reply and I apologize. No, I do not use the legacy mode, it's native 1.5 as you can see in the XML code. I have installed it on many sites, other people have installed it on many Joomla! 1.5 sites too. I don't know what is the problem with your site, but it seems that something is messing with the Joomla! extensions (extensions = compnents, plugins, modules, tempaltes) installer.

Please Log in or Create an account to join the conversation.

  • Nicholas K. Dionysopoulos
  • Nicholas K. Dionysopoulos's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 7 months ago #74949 by Nicholas K. Dionysopoulos
Replied by Nicholas K. Dionysopoulos on topic At last, a working JCE Advanced Link plugin for K2 content items
It will not install through the Joomla! installer because JCE plug-ins are a completely different beast than the Joomla! plug-ins (yeah, it took me a while to figure that one out too!).

Just go to Components -> JCE Administration, click on Plugins and click on Install. The page which loads looks like the Joomla! extension installer, but it's not. It's the JCE plug-ins installer. Use this page to install the plugin and you're good to go :)

Please Log in or Create an account to join the conversation.

More
14 years 7 months ago #74950 by Andrew Gleed
Ah, i did not realise that I had to install the default JCE stuff first in order to see the JCE Administrator features.

I have now done that and successfully installed the k2 jce stuff. However, when I create a K2 item and try to create a hyperlink, the dialog I see to add the link does not have the K2 categories displayed......any thoughts?

Nicholas K. Dionysopoulos said:It will not install through the Joomla! installer because JCE plug-ins are a completely different beast than the Joomla! plug-ins (yeah, it took me a while to figure that one out too!). Just go to Components -> JCE Administration, click on Plugins and click on Install. The page which loads looks like the Joomla! extension installer, but it's not. It's the JCE plug-ins installer. Use this page to install the plugin and you're good to go :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum