Well I guess I will try to break it down here and MAYBE someone with some expert PHP knowledge can confirm it will work.
As I mentioned above I followed the tutorial about making certain menu items available to SuperUsers and Staff Members.
SuperUsers are the site developers and Staff are the actual users of the site. We wanted to limit some items so that a Staff member cant install or change certain items that may break the site or worst may be vulnerable to hackers.
We do not use the standard Joomla article/category creation system instead we have opted to use K2. With that said we have hidden from Staff the any access to the standard joomla article/category creation, access to components, modules, plugins etc. but we have left access to the K2 admin module for creating and managment of articles, categories, comments etc.
Now, since the K2 admin panel offers access to Extend K2, Extra Fields, Extra field Groups and other items, we want to prevent staff members from access those items, while allowing SuperUsers access to add items if required.
So we see that the file /domain.com/administrator/modules/mod_k2_quickicons/tmpl/default.php is the file that shows the access point to K2 features we want to hide.
We have already created the override folder and file at /administrator/template/html//mod_k2_quickicons/default.php
Currently the file looks like...
- Iwo

18 Sep 2013 09:50 - 18 Sep 2013 09:52 Category: English K2 Community
Ok, to reply to myself:
Finally, I decided to not to do this with PHP but with JS instead.
So here is code which is works perfectly for me:
<script> window.onload = function() { var fastInternet = document.getElementById("catid"); for ( var i = 0; i < fastInternet.options.length; i++) { var value = fastInternet.options[i].value; if(value != '149' && value != '150' && value != '151'){ //need to hide this fastInternet.options[i].setAttribute("disabled", "disabled"); } //if you need it else if(value == 'myValue' || value == 'myValue'){ fastInternet.options[i].setAttribute("disabled", "disabled"); } } //hide disabled fo IE $K2('#catid option[disabled="disabled"]').remove(); }; Where:
fastInternet = just variable
catid = name of "select" tag, eg. in K2 "<select name="catid" id="catid">"
149,150,151 = id's of categories which I WANT to use
"$K2('#catid option[disabled="disabled"]').remove();" = hide disabled options in IE,it works without this for FF
With combination of Comparison Operators (eg. instead != you can use ==) you can get probably situation which is what you want.
This JS code is not mine (I wish I know JS that much! ;) ) , it is from here:
JS code source Line for IE I picked up somewhere on this forum.
- Joel Wires

17 Sep 2013 22:42 Category: English K2 Community
I am using K2 to power or employee directory. There are 152 active items in 1 category with 37 tags, and 23 extra fields. The server is a mid-level VPS running the latest PHP 5.3 and MySQL 5.
Our main directory page has all the items listed without images, by tag
- It is averaging around 15 seconds loading time.
- Memory Usage - 47.03 MB (49,312,488 Bytes)
- 14.775 seconds (+14.465); 45.20 MB (+24.061) - beforeRender
- less than a second for everything else
- 1786 Queries Logged
Comments are completely disabled. Catalog mode is on (which helped speed things up alot). I am using template overides, but the default templates take twice the time to load.
Any thoughts? What other info would be needed to help diagnose a problem?
thanks,
Joel
- Axel Kaczoreck

17 Sep 2013 20:16 Category: Offizielle deutsche Gemeinschaft
Hallo Silvano,
Auf der Suche nach einer Lösung für ein Problem das ich habe, ist mir etwas aufgefallen, was evtl. mit Deiner Frage zu tun hat.
Wenn Du auf Komponenten klickst und anschliessend auf KS dann bekommst Du ja die Oberfläche von K2 mit all seinen Schaltflächen wie Artikel, Kategorie etc. Ganz rechs gibt es die Einstellungen Schaltfläche wo man so die Grundeinstellungen von K2 voreinstellen kann.
Klicke dort einmal auf Inhalt. Ein wenig weiter unten findest Du Inhalt aufräumen.
Dort kann man verschiedene Einstellungen vornehmen die alle etwas mit dem automatischem entfernen von HTML-Tags zu tun haben.
Schau Dir das mal an, evtl. wirst Du da ja fündig.
Schönen Abend noch.
Axel
- Monia Chimienti

16 Sep 2013 23:27 Category: English K2 Community
Hi all,
i set up the frontend editing on my k2, but, neither with my administrative profile, i can enter or add any tags.
in the backend i have no problem. when i click on a tag and clik on add button, i have no effect.
can you help me?
- Luuk

16 Sep 2013 21:05 Category: English K2 Community
Hello,
There is this thing that I tried for a long time.
In my K2 store in the 'Item View' of a product, i want to have the image 'medium' on the left and the 'add to cart' button, price, 2 custom fields and the image gallery next to it (on the right). The full description, tags and related items can be placed underneath the image and right column.
Ok so I want to know how to edit this. For sure, I need to edit
templates/template/html/com_k2/templates/default/item.php
Or is it just a k2.css issue?
I can't get the add to cart button on the side of the image and the full description 100% width underneath the image.
Can someone point me in the right direction?
Thanks
:)
- Konstantinos Gourloumenos

16 Sep 2013 15:09 Category: English K2 Community
Yes!
I found one by myself...
you go to templates/<your template>/html/com_k2/templates/portfolio/category.php
in line 42:
<a href="#" id="all" class="active_sort">All</a>
you change the second All with your language
i.e. <a href="#" id="all" class="active_sort">Όλα</a>
In my case I was using the portfolio k2 template, so if you use another one, then you have to go to..
templates/<your template>/html/com_k2/templates/<your k2 template>/category.php
I hope to help you too.
Thanks
- Konstantinos Gourloumenos

16 Sep 2013 14:25 Category: English K2 Community
Hello to everyone,
I have a question about tag cloud.
I am using this in some of my sites, so I can limit tags by specific category, but when I have the same tags to items that belong to different categories, then the results come from all the categories that have the same tags.
For example, I have two categories: videos & sites, and I use tags for the items that belong to them and for some items in both categories I use the same tag: tourism.
So when I am in category listing for videos and I use the k2 tool for tags (v2.6) I limit the tags from this category, but when I press the tag: tourism which, then I get results not only from Videos category but from Sites too.
Is there any way in order to limit the results of the tag cloud to specific categories? Not only the tags but the results too.
Thanks
- fabio

13 Sep 2013 12:56 Category: Comunità italiana K2
Salve sto riscontrando un problema con un campo aggiuntivo "area di testo" di k2.
tutto funziona bene ma mi sono reso conto che superata una certa lunghezza in caratteri (trattasi di testo formattato in html) , al salvataggio il contenuto di testo di tale campo viene perso, e trovo il campo vuoto.
La cosa è molto seria in quanto si rischia, superando tale limite di perdere parte del lavoro fatto, anche durante un semplice modifica del contenuto.
Qualcuno ha risolto?
- Nikos

13 Sep 2013 00:10 Category: English K2 Community
hello !!!
i can't rename to greek language the tag "read more.." in k2 Blog..,...i install greek language backend is in greek language but when change the file in the language folder: en- GB.com_K2 (K2_READ_MORE="Read More" to greek) my shows to the frontend of the site this "�����������"
can help me?
thanks!!
- Krikor Boghossian

Displaying 3181 - 3200 out of 6582 results.
- Forum
- Search