Keyword

Advanced Search

Search Results (Searched for: k2 Tag)

  • Jock
  • Jock's Avatar
07 Jul 2011 21:00
Replied by Jock on topic Extra fields in search results

Extra fields in search results

Category: English K2 Community

Hi BBC,

 

Could you explain how I would resolve this? As far as I can tell K2 items are being returned in the search but with empty paragraph tags where the snippet should be.
  • Chris Stanage
  • Chris Stanage's Avatar
07 Jul 2011 09:37
Replied by Chris Stanage on topic K2 Cache is too big com_k2_extended

K2 Cache is too big com_k2_extended

Category: English K2 Community

Com_K2 i imagine is the for the component itself considering it's not light weight, and com_k2_extended i would imagine would be all the code involving the articles you make like alt tags, width tags and general css and html stuff like that. But i only have a few articles and my cache is huge, Making me only able to make a few articles. i have 8 articles and my cache goes as high as 1 meg that's too much. If i make 16 articles then so on 2 megs. I'd like to have thousands of articles but scratch that.
  • gerardo
  • gerardo's Avatar
07 Jul 2011 08:12

Problems making item form fields required!

Category: English K2 Community

Ok, I tried making three different fields from the item form required but I have a different problem with each.

 

First I tried making the first field from my Extra Fields required, so I used this:

 

} else if (trim( document.adminForm.K2ExtraField_1.value ) == "") {            alert( '<?php echo JText::_('You must fill Extra Field 1', true); ?>' );

 

The problem was that I was then unable to save items from categories without extra fields. Do you know a way of making the extra field required ONLY IF one of certain categories were chosen?

 

 

Then I tried making the content field, the one for text with the editor, required. I used this:

 

} else if (trim( document.adminForm.text.value ) == "") {             alert( '<?php echo JText::_('You must fill the description in the Content tab', true); ?>' );

 

But then I couldn't save items untill I pressed the "toggle editor" button and left the text area without editor. I don't get why that happened. What would I have to do to make that field required without having to loose my editor for saving? 

 

 

Finally I tried making the tags field required. I tried this then:

 

} else if (trim( document.adminForm.tags[].value ) == "") {            alert( '<?php echo JText::_('You must attach tags to the item.', true); ?>' );

 

I really don't know about "tags[]". Anyway, after putting that in the code I could still save the form even though I left the tags field empty. Do you know what I had to write to make the tags field required?

 

 

Could you help me with any of the three fields or all three of them?

 

Thank you in advance!
  • Rastislav Klc
  • Rastislav Klc's Avatar
06 Jul 2011 19:36
Replied by Rastislav Klc on topic Simple Image Gallery does not work in k2

Simple Image Gallery does not work in k2

Category: English K2 Community

Hi guys,

there is so much stir in this topic that I would like to clarify the whole thing the way I understand it.


K2 is content component for Joomla. As such it brings its own handling of certain aspects of output and awesome templating techniques :) Therefore it does not necessary behaves exactly as original content in Joomla. Extra Fields, I think, were originally meant to simply enter some simple "extra" information that can be used in template .php file to user's liking. Extra Field does not necessary holds information that should be outputted DIRECTLY to the browser. It could be counter of some sort, it can be weight, color, age, etc. (value can be used as counter in cycles, path to file, extra configuration...). But also it can hold html code meant for output (ex: room description of hotel in my website).


So the information of what should happen with this Extra Field information is prescribed in .php template file. There is some default behavior which is written in bunch of default templates, for ex. in file:
components/com_k2/templates/default/item.php

However you should never touch this file. Therefore there is perfectly legitimate and advised way of customizing and overwriting this .php template file - which is essential to K2 templating. You can read details about K2 templating here simon.getk2.org/k2-documents/item/91-templating. Making long story short, for above file there should be this custom file that will handle representation of default item:
templates/YOUR_TEMPLATE/html/com_k2/default/item.php

This is not a hack, this is how it should be done and you are not touching core files, just customizing template.

 

So basically when you create template from scratch (or just copying and adjusting existing default template), you need to define how those Extra Fields will be handled. By default they are just plainly echoed for browser as name and value pair. See that original item.php file around line 255. However they are not scanned for {plugin} tags, therefore plugins are not recognized.

 

You can write your own template (or copy and adjust existing). There are basically 2 aproaches that come to my mind. Both will require to adjust for ex. this file
templates/YOUR_TEMPLATE/html/com_k2/default/item.php
and of course that template must be activated in Joomla backend. You do not have to build whole new template, neither your template will have to have all the template files, it is enough to copy and adjust just single file, rest of the template will automagically use default template provided by K2. So finaly here are two snipets that could be used in item.php custom template file:

 

1) Output all the extra fields in the same fashion as it was main content (example lacks any extra html formating):
<?php foreach ($this->item->extra_fields as $key=>$extraField): ?> <?php echo JHTML::_('content.prepare', $extraField->value); ?><?php endforeach; ?>

In this case you can write in any extra field html + any plugin with its crazy parameters and it will be outputed as expected. So you can enter in backend's extrafield something like this:
This is my gallery. {gallery rows=3 cols=1 width=200 height=140 crop=1 labels=captions alignment=left orientation=horizontal buttons=0 links=0 counter=0 overlay=1}stories/brasil/{/gallery} Pictures are showing my vacation in Brasil :)
 

2) There could be numerous cases when you decide that extrafield will hold just partial info (like path to the gallery). ex: first extrafield will be gallery description, second field path, etc. you get the idea:
<?php
$galleryDesc = $this->item->extra_fields[1]->value $galleryPath = $this->item->extra_fields[2]->value
echo
$galleryDesc .'<br />'
;
echo JHTML::_('content.prepare', '{gallery}' .
$galleryPath
.'
{/gallery}'
); ?>

So the difference is in designers mind. You just have to know what to expect in Extra Fields and prepare content according. then in .php template file put all the pieces together as you like.


This was exhausting post :)

 

PS: there couold be some syntax mishap, I did not test it, but sure the idea is right.
  • Goran Mitic
  • Goran Mitic's Avatar
04 Jul 2011 09:27
Replied by Goran Mitic on topic front edit problem [SOLVED]

front edit problem [SOLVED]

Category: English K2 Community

Hello William,

and thank you for your time and input.

 

I am in 'web business'  a year, so I do not quite understand your first proposal: "Try turning error reporting on highest and see if it will give an error."

 

But I did switch couple of templates - and there it worked perfectly! So I guess it is template issue...

Template is custom made, so I would be grateful if you could point me to where I can get additional info on how to make this work...

 

K2 information tag, well I guess there is all in place, I am not sure what to look for (everything is installed and enabled)...

 

As for plugins, I have (beside jce) this log in javascript based module, but will check the rest.

 

Thank you
  • Louis Tran
  • Louis Tran's Avatar
04 Jul 2011 07:20
How to set Items number in categories view was created by Louis Tran

How to set Items number in categories view

Category: English K2 Community

Hello,

 

I have just installed K2 for our site and have a question. How can i set number of items will display in categories view? I tried to find all option but only Layout & view options for user (author) pages/ Layout & view options for Search, Tag & Date listings/ Comments can set number of items to display.

When i created a menu for K2 using Items list/ category, this is no option to set number of items to display too but it was set 10 items during other categories set only 6. 

 

Can any body help me to change this setting? 

 

Thanks in advanced !
  • Donato Apollonio
  • Donato Apollonio's Avatar
02 Jul 2011 10:50
copyright info was created by Donato Apollonio

copyright info

Category: English K2 Community

I created a new module based on mod_k2_content adding new functionalities (filter by tag using AND, OR and NOT, events management). I want to add the module in JED but, before doing it, I want to put my name in copyright info (in xml and in file headers) according to GPL rules. What is the correct way? Do I simply append my copyright info to the existing infos?
  • ruigato
  • ruigato's Avatar
02 Jul 2011 00:34

Multiple tag types/ Tag Categories / custom taxonomy

Category: English K2 Community

Hello

 

Dont know if this is possible but would be reall cool to implement on k2.

Something like wordpress does:

justintadlock.com/archives/2009/05/06/custom-taxonomies-in-wordpress-28

 

Tags can be translated and are user friendly, the searchable extra items not.

 

Righ now we have:

 

Product Name

Tagged under: blue, big, cheap, leather

 

If we could have multiple tag types and could translate tag to whatever we like we could have something like this:

 

 

Product name

Color: Blue

Size: Big

Price Range: Cheap

Material: Leather

 

 

Tags are very powerfull and will be great type of extra field,

We could make a menu item by tag type, translate the tags, etc

 

 
  • BBC
  • BBC's Avatar
  • Arron Adrian Javal
  • Arron Adrian Javal's Avatar
30 Jun 2011 10:02
Horizontal Log In Module was created by Arron Adrian Javal

Horizontal Log In Module

Category: English K2 Community

hi, as the title says, is there a way or any free module that offers you a horizontal log in for k2? ive found one in joomla xtensions but its commercialized. i also tried tweaking the mod_k2login/login.php but its not working right. can anyone please help me?

 

edited:

and also, i used the mod_k2content in my front page so every articles i published in my news menu is also viewed in the front page. but the module displays the article title with the same css of the templates <a href> tags, i dont want that, being a title, i want it bold and 14px in size.

 

thanks and regards,

 

arron
  • James Anderson
  • James Anderson's Avatar
30 Jun 2011 01:05

K2 Search returns different results with/without punctuation

Category: English K2 Community

For some reason our K2 tools/search returns different results when you have a word with { ' } in it.

 

example maui and maui's returns two totally different results.

 

maui's returns alot of results that include { 's } in the titles and tags.

 

Is there any way around this..?
  • Adam Malik
  • Adam Malik's Avatar
28 Jun 2011 13:58
Replied by Adam Malik on topic display of K2 Tags

display of K2 Tags

Category: English K2 Community

Sorry my staging VPS went down so you may not have seen these links, it works now.

 

Any help on this would be much appreciated.
  • Pixeden
  • Pixeden's Avatar
27 Jun 2011 19:45

How can I add corresponding category to "Related items (by tag)"

Category: English K2 Community

for this the simpliest will be to do a simple query in the database:

 

<?php         $catidrelated = $item->catid;                    /*get cat name from database K2*/                    $db        = &JFactory::getDBO();                    $namecatdb  = "SELECT name FROM jos_k2_categories WHERE id = ". $catidrelated ."";                    $db->setQuery($namecatdb);                    $itemdb = $db->loadObject();                    $catname = $itemdb->name;                    echo $catname;        ?>

 

Please change variable name according to your needs so that it doesn't replicate a var name that already exist in your file.

 

Any questions don't hesitate.
  • Pixeden
  • Pixeden's Avatar
27 Jun 2011 19:44

How can I add corresponding category to "Related items (by tag)"

Category: English K2 Community

Hi all,

for this the simpliest will be to do a simple query in the database:

 

<?php         $catidrelated = $item->catid;                    /*get cat name from database K2*/                    $db        = &JFactory::getDBO();                    $namecatdb  = "SELECT name FROM jos_k2_categories WHERE id = ". $catidrelated ."";                    $db->setQuery($namecatdb);                    $itemdb = $db->loadObject();                    $catname = $itemdb->name;                    echo $catname;        ?>

 

Please change variable name according to your needs so that it doesn't replicate a var name that already exist in your file.

 

Any questions don't hesitate.

 

Blindside211 said:

Hello Case,
I know it's been a while since you posted this. Just wondering if you found out the answer. I am trying to do something similar.

I'll keep hacking at it.

-Bert
  • Adam Malik
  • Adam Malik's Avatar
27 Jun 2011 12:17
display of K2 Tags was created by Adam Malik

display of K2 Tags

Category: English K2 Community

Hi I have spent 4 days looking for the answer to this and I cant find it. Issue is when you click on a 'tag' it displays it on the front page rather than within the category (much like on the K2 demo site)

 

The category output can be seen here:

maven-cast.com/index.php/digital-tracks-13th-14th-july.html

 

If you click on a 'tag' say security it then jumps to the front page, see

maven-cast.com/index.php/tag/security.html

 

I am using sh404sef I tried eliminating that as an issue by not applying it to the K2 extension but is still does the same.

 

The output/execution I am looking for is to render the results for the tags the same as the category output. maven-cast.com/index.php/digital-tracks-13th-14th-july.html

 

 

 
  • Rx Greenthumb
  • Rx Greenthumb's Avatar
26 Jun 2011 17:06
Replied by Rx Greenthumb on topic K2 Front page items

K2 Front page items

Category: English K2 Community

Once you get use to the Tools module, you'll have a field day. I create multiple copies of it to make all sorts of little sub-modules to stick in Wherever I want to.

Also, check out the folks at NoNumber www.nonumber.nl/extensions/advancedmodulemanager they have some excellent admin stuff that will help you in your management. For instance the link provided is for their Advanced Menu Manager Module... it is AWESOME! I also use their Tabber and Slider a lot as well.

With Adv Mod Mgr I can turn off the Category Module from the Main page when I go to a Category Selection from a menu for instance, and turn on a specific Category Module for that Category, which I display in my right area of the page. Both Category Modules are copies of the K2-Tools Module, configured to be a pull down menu when displayed. So on the Main Page you get the full site and all sub-categories listed in the pull down menu. When you go to the sub-category menu selection, you get the Categories from that Main Category and below showing up in the pull down only. Play with it, it's easy.

Again can't say enough about the folks at NoNumber, they have saved me countless manhours with their tools. One I really like is Sourcerer, it puts in a nice clean button at the bottom of your editor that places a source code tag in the article, and pops up a window that lets you cut and paste your php code, save and BAM! job done, custom php module created, now place it where you want on the site with Module Manager. Nice!

RX
  • JustBe
  • JustBe's Avatar
24 Jun 2011 20:11

How to archive with k2 tools and exclude certain items

Category: English K2 Community

 

Hi

 

Can I exclude certain items (or catagories) in the archiving function of k2 tools?

 

 
  • Mike Miller
  • Mike Miller's Avatar
24 Jun 2011 00:58

Add user avatar next to item in catagory view

Category: English K2 Community

Hi I checked the forums and found seemingly legitimate and correct answers to my question which is,"How do I add the user avatar to the left of the item the user posted in catagory view?" However, the posted solutions did not work for me. I am using joomla 1.5.22 and k2 v2.4.1. Any help on what directory the files are in and what needs to be added or edited? I would like it to look the same way you have it set up in the forums where people are posting discussions with their avatar next to their post. Thanks!
  • Noarah
  • Noarah's Avatar
23 Jun 2011 17:49
LinkWithin Widget ...? was created by Noarah

LinkWithin Widget ...?

Category: English K2 Community

Hi K2 People ...

I'm wondering if  I could add LinkWithin widget inside my K2 blog ... coz  I tried many times to add it to several files inside the K2 blog but it doesn't work ?? could u help me please to figure it out ?

Thanks

Paste the following code snippet before the </body> tag (not below each story) in your blog template:

&lt;script&gt;var linkwithin_site_id = .....;&lt;/script&gt;&lt;script src="www.linkwithin.com/widget.js"></script><a href="/www.linkwithin.com/"><img src="/www.linkwithin.com/pixel.png" alt="Related Posts Plugin for WordPress, Blogger..." style="border: 0" /></a>

 


 
  • gerardo
  • gerardo's Avatar
22 Jun 2011 20:28
Replied by gerardo on topic Empty tag pages?

Empty tag pages?

Category: English K2 Community

Ok, I did a little experimenting in the tags in my K2 site. I discovered I "damaged" some words. If I try using those specific words for my tags, the items won't show when I use those tags for searching. Those words were the first tags I had created, and I wanted to change their first letter from upper to lower case so I tried in the backend, but since I wasn't able to change the case like that I decided to delete them all and start tagging from scratch using only lower case. For some reason that was what damaged those particular words.

 

Now I can tag with different words, cause they will show items when searching by tags, but not the ones damaged. That's a big problem cause I need those words for tagging, they're basic words for my website's theme. I suppose that even though I supposedly deleted all my tags, the words are still somewhere inside a code and that's why I really couldn't start from scratch.

 

I hope all this info is useful so you can give me some good advice of what to do!
Displaying 5001 - 5020 out of 6582 results.

Powered by Kunena Forum