Hot answers tagged

9

It depends on what .php document you're in - if you're in item.php, or the category-item.php files, the following should work. In the top of the document, add this code: <!-- Call to prepare extra fields --> <?php $extrafields = array(); foreach($this->item->extra_fields as $item) { $extrafields[$item->id] = $item->value; } ?&...


6

Option 1 During a similar situation to your own, I did some research and collected potential reasons for exceeding resource limitations on a shared hosting plan and you may find the following list useful in tracking down your issue. Memory and CPU resource utilisation are often linked. For example, if memory resources are in short supply, memory might be ...


6

$tableClass is a variable. You won't find a class named "tableClass". It's just a placeholder for the real class name which will be generated at the beginning of the getInstance method. Take a look at lines 268-272 where getInstance begins: public static function getInstance($type, $prefix = 'JTable', $config = array()) { // Sanitize and prepare the ...


4

If the main concern is front end search then you could just switch to using tags for displaying the authors' names. Then you can add author information to the tag for each author and when you clicked the tag you'd get the author information plus the list of all items created by that author. You could also make a menu link for each author if you wanted to ...


4

We actually bought a commercial plugin to do this. So far it seems to work well, without you having to mess with real database exports and getting into mysql. K2 Import Component


4

First off, you have duplicate content (which as you have noticed is hurting your rankings), even though it is using the canonical attribute. I Googled your site, and both links lead to the same exact page. Make sure you heave it set up like this in K2 http://www.pixelfire.com.au/images/blog-images/K2-settings.jpg ;) Second, you didn't mention when moving, ...


4

Instead of $_SERVER['REQUEST_URI'], you can rely on JUri::root() template parameter can not be added concatenating it with &. It has to be ? ... but it depends on the Url query. Thus, you need a piece of code like this to define the glue: $uri = JUri::getInstance($url); $query = $uri->getQuery(); if (empty($query)) { $glue = '?'; } else { $...


4

Dont change the orginal language files of an extensions. All your changes will be lost at the next update. Instead use Language overrides a tutorial how to use is there : http://www.inmotionhosting.com/support/edu/joomla-3/languages/overrides


3

Firstly, not everything can be overriden, sometimes you can just create your own mod_myk2_tools. Secondly, a feature can be overriden only if it is instantiated with a dynamic loading mechanism. This kind of technique checks if a resourse is already loaded before loading, allowing to load it before. In mod_k2_tools module, the helper is just included in ...


3

I have just recently stumbled upon following extension http://www.joomreem.com/multiple-extra-fields-groups-mefg-for-k2.html . It is commercial, and they claim to solve just the problem of having multiple Extra Field Groups for a K2 item. Haven't tested it yet, though...


3

You can try this bellow procedure: step 1: Copy the k2 components (components->com_k2) step 2: Paste (templates->'your templates'-> inner html folder) step 3: Open (templates->'your templates'-> html -> com_k2) folder and delete all file except templates folder step 4: Open (templates->'your templates'-> html -> com_k2->templates) folder and copy ...


3

There is a way by exporting required k2 tables in your hosting phpmyadmin in Site A and then import those tables in Site B database.in site B you have to have k2 installed, after export, to check if there are any k2 table column missing, you have to go extension manager->database page and need to click fix. For this kind of exporting, you have to export ...


3

Did you try this in your Admin config: Menu >> Item Menu K2 Category >> Tab Options >> Fetch items... (Will show children items in yours subcategories) Item Ordering ... (You can choose may options)


3

There may be a correct way deeper in the depths of K2 to not have the disabled categories in the list in the first pace, however, the quickest solution is to use regex to remove them. <?php $catinput = $this->lists['categories']; echo preg_replace('#<option[^>]*\sdisabled\=[^>]*>.*?</option>#','',$catinput); ?>


2

http://jeffchannell.com/Joomla/load-the-joomla-framework-in-a-non-joomla-php-script.html Using the above technique you can create an ajax.php file in the root directory and use the Joomla API's to call the data yourself from the database, then convert to JSON. This will allow you to possibly use the k2 helpers to assist with it. Calling the database like ...


2

I have done the same thing for research journal last year in Joomla 2.5. I needed to use Community Builder for the author profiles. Look here for example: http://www.bwpat.de/ausgabe/25/schwarz-bretschneider Then I used the extension fieldsattach to add a new field for the author IDs (and some more fields). In this field the author IDs in the correct order ...


2

This is what I did : duplicated the isis template and asigned the duplicated template to the target users. Created a template override for the com_k2 item in /administrator/templates/isisCopy/html/com_k2/item/default.php and deleted the unwanted fields in that file.


2

Here goes nothing.... First this may not be an answer, its just a chain of thought that might help isolate the actual issue, by the looks of it without admin access it would be hard to dive deeper. First it is redirecting to 404 because it thinks the page is not there. However 404 is also not there, so it tries to redirect to the 404 page, and you can see ...


2

There are a couple of queries that you need to execute. Please use these queries first on a test environment. There is an idea: /* Query 1: Select the id of the tag */ SELECT id FROM `#__k2_tags` WHERE `name` = 'mercedes' LIMIT 1; /* Query 2: If previous query returned null, create a new tag */ INSERT INTO `#__k2_tags` SET `name` = 'mercedes', `published` ...


2

This exactly what the Datasets for K2 plugin does: http://www.joomreem.com/extensions-store/k2-datasets Also, there is a documentation to learn in details how to use it: http://www.joomreem.com/documentation/item/58-joomreem-k2-datasets-user-manual.html


2

We have added multiple extra fields for K2. Extra fields can be applied to multiple extra field groups. The extra field groups can then be applied to multiple items or users. At test version can be download from Github download of k2 multiple extra fields WARNING - this is only for testing purposes. It should only by used on a test/development site.


2

Run this query. Don't forget to change the table name and database name to your's bq1ry_k2_categories. CREATE TABLE IF NOT EXISTS `bq1ry_k2_categories` ( `id` int(11) unsigned NOT NULL, `name` varchar(255) NOT NULL, `alias` varchar(255) NOT NULL, `description` text NOT NULL, `parent` int(11) DEFAULT '0', `extraFieldsGroup` int(11) NOT NULL, `...


2

This situation can happen if K2 was installed in the past and not removed correctly or after a failed install attempt. Have a look with your FTP client for either of the directories below as K2 checks for them to establish if you already have it installed: administrator/components/com_k2 components/com_k2 Option 1 Remove these directories and try to ...


2

I just did it like this: This code comes to the file latest_item.php: <?php if (isset($this->item->extra_fields)) : ?> <div class="catItemExtraFields"> <ul> <?php if (is_string($this->item->extra_fields)) { $this->item->extra_fields = json_decode($this->item->extra_fields); } ...


2

To my knowledge, K2 v2.x does not support permissions for categories. Also, I don't think ACL Manager will be much of help here. For full ACL implementation of the Joomla core into K2, you should wait for the K2 v3.x. However it is still in beta phase, although it supposed it would have been out by now. You should be patient and wait for it. What's new K2 ...


2

There is a naming issue. If the class does not match exactly what Joomla is looking for, then events are not going to be fired. If your plugin is plgiesrelatednewsprogramme, the class name must be PlgK2Plgiesrelatednewsprogramme.


2

It is quite simple, actually. Find a beautiful template on the web, then upload it to your site, then modify the category, or categories, that you're listing, to use that template in the backend: Administrator Menu: "K2" -> "Categories" -> "Edit Category" -> "Category Item Layout" (Tab on the right) -> "Select a template" Or you can create your own ...


2

You may have to insert a meta tag manually for each page into a block of content that you do not want robots to index. <meta name="robots" content="noindex, nofollow"> OR You can go into your robots.txt file and disallow by url/path Disallow: /page/to/your/path


2

In K2, articles are represented by K2ModelItem (com_k2/models/item.php, line 892), where you can find: function hit($id) { $row = JTable::getInstance('K2Item', 'Table'); $row->hit($id); } If you are fetching items directly from tables, then it is not consistent with K2 model. It would be better to follow the general MVC pattern and access them ...


Only top voted, non community-wiki answers of a minimum length are eligible