Keyword

Advanced Search

Search Results (Searched for: k2 Tag)

  • Nick
  • Nick's Avatar
03 Apr 2011 18:15
Replied by Nick on topic K2 item in Multiple Categories

K2 item in Multiple Categories

Category: English K2 Community

use an xref table. Easy. That way you can link multiple categories to 1 item id. Or you can go the cheap way and store all the categories inside a new row and have php then parse out the id's. This can be done with explode() and implode()

As for the back end you can have a new drop down appear after you select a category. I have over 200 categories so a tag based system or a simple list system wouldn't work for me (unless the list is inside a frame)

It's really not hard to do guys.. I could code it in several days.. i'm just working on college stuff right now.
  • Dave Malhotra
  • Dave Malhotra's Avatar
03 Apr 2011 15:26

"More in same category" Item listing within an item/article page

Category: English K2 Community

Hi William,

 

Thanks! Reading about it now and it seems to be what I'm looking for for sometime now. Just wondering if the tag can be placed in the K2 template item.php file. Will try that out.

 

Thanks again. I think the K2 community is awesome!
  • Francisco Caivano Zori
  • Francisco Caivano Zori's Avatar
03 Apr 2011 04:59
Related for specific category. was created by Francisco Caivano Zori

Related for specific category.

Category: English K2 Community

Hi, im tryng to load a list of related items but from specific categorie.

 

I have found this code:

//Related items        if ($params->get('itemRelated') && isset($item->tags) && count($item->tags)) {            $model = &$this->getModel('itemlist');            $relatedItems = $model->getRelatedItems($item->id, $item->tags, $params->get('itemRelatedLimit'));            if (count($relatedItems)) {                for ($i = 0; $i < sizeof($relatedItems); $i++) {                    $relatedItems[$i]->link = urldecode(JRoute::_(K2HelperRoute::getItemRoute($relatedItems[$i]->id.':'.urlencode($relatedItems[$i]->alias), $relatedItems[$i]->catid.':'.urlencode($relatedItems[$i]->categoryalias))));                }                $this->assignRef('relatedItems', $relatedItems);            }        }

 

 

 

But i dont knwo how to add a category variable, so i have a "itemRelatedcat" and on the item.php i can add something like:

 

<?php if($this->item->params->get('itemRelated') && isset($this->relatedItems)): catid="2" ?>  <!-- Related items by tag -->    <div class="itemRelated">        <h3><?php echo JText::_("Related items (by tag)"); ?></h3>        <ul>            <?php foreach($this->relatedItems as $key=>$item): ?>            <li class="<?php echo ($key%2) ? "odd" : "even"; ?>">                <a href="<?php echo $item->link ?>"><?php echo $item->title; ?></a>            </li>            <?php endforeach; ?>        </ul>        <div class="clr"></div>    </div>    <?php endif; ?>
  • HeartFreedom
  • HeartFreedom's Avatar
03 Apr 2011 03:26

How to show Product Prices without Add to Cart in K2/K2Mart

Category: English K2 Community

Hi!

I congratulate you on making an excellent K2 component for joomla. It really gives power and beauty to websites and helpful for Joomlars..... I've used K2Mart as well. It is good but it needs some more power and feature along with K2 which other carts have (specially Tienda and some others) Although they lack some features which K2 has.

 

I have some issues with K2 and K2Mart and I'd be thankful if you help me ASAP. and I hope you'll keep in mind about such minor things in near future while developing newer versions.

 

I need to show product prices under the product title with different font ( or the title and prices under the product picture thumbnail) in category item view. and I need to show the same under product title on item page without cart button. 

And how can I show the prices in 2 currencies at a time?

Actually I want to create a product catalog with prices but It is impossible to show prices in K2 alone. And when I try to give prices in K2Mart then it always shows the SKU, Vendor, Manufactures and Price  tags downside the page. I dont want them at all. I just need to show the Prices in 2 currencies under the product title with different font and color both in category and item view.

 

And there should be thumbnail image uploading link as well because auto thumbnail looses the picture quality.

 
  • Dave Malhotra
  • Dave Malhotra's Avatar
03 Apr 2011 01:34

"More in same category" Item listing within an item/article page

Category: English K2 Community

What I am trying to achieve is that when readers finish reading a news story, he can click to read another story from a "More in the same category" box right below the article. This box should list about 10 other latest articles from the same category as the current article.

 

In fact in K2, there is Item Navigation which displays links to the previous article and next article. But this is limited to only 2 articles.

 

Does anybody a way to achieve this?

 

One idea is to embed/include a K2 Content module into the K2 item.php template file. But the question then is, is it possible to include a module within the template file? I tried the php include, didn't work. I even tried Jumi tags, that didn't work too. Please tell me too if it is possible to include a joomla module within a template file.

 

Thanks in advance.
  • juju
  • juju's Avatar
02 Apr 2011 12:50
Simplify the add form in K2... was created by juju

Simplify the add form in K2...

Category: English K2 Community

Hi !

Here is the message I send to Simon and JoomlaWork, if somebody can help ... :



You've maybe followed our discussion on this forum, about change the save button of the adding form in K2 (with me, Hanny and some other users).
I use K2 to manage my articles in my Joomla Website. I like it, but there is one a big disadvantage : The form for adding an article is no really pleasant to use.

In fact, the size of the pop-up box is fixed in pixel, so on some computer is ok, but on some others with different resolution, it's too big or too small...

The pop-up idea it's not a good idea I think.

I want to change the way to add an article, and I need help.

We should remove this pop-up and make the entry of an item directly on the page, like on this forum.

I want to have an really simple editor like on this forum. I assume the developpers creat theirself this editor, starting with TinyMCE, but if I have to pay, it's not a problem, I could understand that they don't want to give me their work for free ;)

I have to said that I try to modify the file form.php, but regarding to remove the pop-up box and put the form in a page integrated IN the website (with the banner, module at right...), I don't know how to do.

So, I'm done, I really hope you can do something for me, and I think not only for me; but for a lot of people ;)

Thanks !
  • Terry Britton
  • Terry Britton's Avatar
01 Apr 2011 19:35
Replied by Terry Britton on topic Bullets in the CSS on the toolbar and module...

Bullets in the CSS on the toolbar and module...

Category: English K2 Community

You're almost there.  The code changes are working fine.  Just change the | symbol to a comma if that's what you want.  I looked at the page and the css changes aren't being applied.  All I see in your K2.css is the following, which does not appear to be being applied, plus you need to address both the li and the ul.

div.itemTagsBlock ul.itemTags li {display:inline;list-style:none;padding:0 4px 0 0;margin:0;text-align:center;}
Enter the line exactly as I gave you in the thirdparty.css and see if that works. Again I hate gantry.
  • canderson
  • canderson's Avatar
01 Apr 2011 16:03
Replied by canderson on topic Bullets in the CSS on the toolbar and module...

Bullets in the CSS on the toolbar and module...

Category: English K2 Community

Terry, I added the codes you mentioned (K2 > generic > item.php and then K2 > css > k2.css) and it didn't change anything except add the | line in between the bullet points and the tag. See here: www.papublicmedia.org/cancer-and-treatments/test-story-5-31611

Any idea?

I agree with the Gantry templates, they also load an insane amount of css files (I saw a site that had a page calling over 450 css files that was Gantry-based!).
  • Olti Buzi
  • Olti Buzi's Avatar
01 Apr 2011 12:12

Open Graph Protocol Support for the New Version of K2

Category: English K2 Community

Hi to all K2 developers!

 

I think that a new feature to be added to K2 is to support directly the OPEN GRAPH Protocol used by Facebook.

 

I think that every page (user, category, tag, etc) must be categorized also by these specifications.

 

Of course, the ideal thing is to give the possibility to the Admin to choose if enable or not of such feature.

 
  • Terry Britton
  • Terry Britton's Avatar
01 Apr 2011 01:15
Replied by Terry Britton on topic Bullets in the CSS on the toolbar and module...

Bullets in the CSS on the toolbar and module...

Category: English K2 Community

Add the following to your css file.   I would just use the K2 css file so you don't affect other components.

 

.itemTagsBlock ul, .itemTagsBlock li {list-style:none !important; display:inline !important;}

 

If you don't already you should try using Firefox with Firebug to view and modify your css.  It works great, although I hate the new gantry templates from Rockettheme because all they've done is make the css more confusing.
  • juju
  • juju's Avatar
31 Mar 2011 17:37
Replied by juju on topic K2 Add new item window resize

K2 Add new item window resize

Category: English K2 Community

Tafadzwa Makura : I apologize, it's not easy, the value are for example : size:{x:990,y:650} So for percentage I don't know how we can do it :/

 

I test with JS code, but I do something wrong and it doesn't work :/
  • Tafadzwa Makura
  • Tafadzwa Makura's Avatar
31 Mar 2011 17:16
Replied by Tafadzwa Makura on topic K2 item in Multiple Categories

K2 item in Multiple Categories

Category: English K2 Community

You can achieve category images, descriptions, etc. by calling the relevant tags in the category view instead of viewing them in the tag list. What this means is that your related by tag articles will appear below the actual articles in the category view including category images, descriptions, etc. Since all changes are made in the custom template folder there is no hacking involved!
  • Brian Bachtel
  • Brian Bachtel's Avatar
30 Mar 2011 23:19

Tags not in alphabetical order in the available tags box

Category: English K2 Community

Hi Pieter,

 

I know this discussion is over a month old, but in case you haven't figured it out yet and for those coming here and seeing this you need to change the getAvailableTags function to this...

 

function getAvailableTags($itemID = NULL) {        $db = &JFactory::getDBO();

       $query = "SELECT * FROM #__k2_tags as tags";

        if (!is_null($itemID)){

        $query .= " WHERE tags.id NOT IN (SELECT tagID FROM #__k2_tags_xref WHERE itemID=".(int)$itemID.") ORDER BY tags.name";

        } else {

        $query .= " ORDER BY tags.name";

        }

        $db->setQuery($query);

        $rows = $db->loadObjectList();

        return $rows;

    }

 

Reason for the else is because a new article does not have an "itemID" yet so the ORDER BY was being ignored in the original code. Resulting in an unordered tag list in new articles. Adding the else statement takes care of this.

 

Hope this helps.

 

Brian
Pieter said:

bump.

 

In my case, it doesn't work with new items, but if I open an item, the tags are ordered by name. Is there a different .php file for the new item??
  • sherri sabo
  • sherri sabo's Avatar
30 Mar 2011 21:42
K2 Module Titles Not showing up was created by sherri sabo

K2 Module Titles Not showing up

Category: English K2 Community

I have "show title" checked for my K2 Tools Module, but the titles are not appearing. Please help me out. What am I missing. I created a category list module and a tag cloud module and both have show title checked but the title does not appear above the category list or the tag cloud. Here is a link -->

 

www.saltedpig.com.php5-21.websitetestlink.com/saltedPig/index.php/thoughts/itemlist/category/2-bikes

 

I attached a screen shoot that shows that I have "show title" checked.

Thanks for the help
  • juju
  • juju's Avatar
30 Mar 2011 20:20
Replied by juju on topic K2 Add new item window resize

K2 Add new item window resize

Category: English K2 Community

I don't know, it's easy to test, you put the value en percentage and you see if it's work :)
  • carmiaca
  • carmiaca's Avatar
30 Mar 2011 19:53

K2 Item Edit hack to show just the user's folder when browsing

Category: English K2 Community

In the item editing window when you click Browse Server on the Image tab it takes you to the default images folder set in Global Configurations in Joomla! so you see all the folders on the server. I didn't want the user to be able to select another user's content, so after a good deal of sleuthing I came up with this hack:

Open the administrator/components/com_k2/views/item/tmpl/filebrowser.php

On about line 12, under the restricted access and within the PHP tags put this to grab the user id:

$user =& JFactory::getUser();$userid=$user->id;

 

Then at around line 32, under if(count($this->folders)): and still within the php tags put:

  if($this->path==$this->parent){//root folder of the images path            $this->folders=array($userid);//reduce folder array to just the user's folder   }

What it does is see if you are at the root images path and, if so, the folder array is changed so it contains only the user's folder.
  • Tafadzwa Makura
  • Tafadzwa Makura's Avatar
30 Mar 2011 19:06
Replied by Tafadzwa Makura on topic K2 Add new item window resize

K2 Add new item window resize

Category: English K2 Community

Can Use Percentage width/height instead of fixed width????
  • Tafadzwa Makura
  • Tafadzwa Makura's Avatar
30 Mar 2011 18:55
Replied by Tafadzwa Makura on topic K2 item in Multiple Categories

K2 item in Multiple Categories

Category: English K2 Community

In future K2 versions I think this can be easily achieved by employing the Primary and Secondary Category model as I mentioned in my previous post! What this will mean is that each item on creation will have a primary Category this is the "Host/Primary category" where the item will be stored and linked to! In addition an article could have a number of Secondary Categories much like a tag  but they will have similar names to existing categories since they will get their names from the k2 cartegories table this way they become dynamic. If a Primary Category is created then a Secondary Category is automatically created as well, when a Primary Category is deleted then the corresponding  Secondary Category is deleted as well. Users/Editor/Admin etc won't be allowed to add/edit/delete Secondary Category names directly this can only be done by adding/editing/deleting a Primary category.

 

After a user has created their item they choose the primary category they want their item to belong to, this is where the reference article can be stored. Just like tags a user can then add as many multiple Secondary Categories as they need. Secondary Categories only pull the refrence item directly  from it's primary Category without copying or moving it! If the Item is deleted from it's primary category then the Secondary categories will automatically stop linking to it because it disappears with its stored secondary Category (just like tags). 

 

In the category list  a php script will fetch the value of the current primary category title lets call it ($currentPrimCatTitle) and then pull any other items whose secondary category title ($item->secCatTitle ) matches ($currentPrimCatTitle). These articles will then be displayed in the cartegory list with all the other articles that share that Category. This system already works with tags I'm sure it will be much easier to intergrate. 

 

Advantages. 

1.) Only one copy of an item will be used to create multiple instances of it in different cartegories. 

2.) The creation/deletion and edition of Secondary Categories will happen dynamically making sure they remain synced with their Primary Category Counterparts and reducing the workload on the users part.

3.) No additional Data is written to the Database outside the item's database row when an item is added! 

4.) The system is intuitive, meaning a user/editor/admin can easily add and remove  Secondary Categories from their current item.

5.) Changing an item's Primary Category will not break it's connection with it's current Secondary  Categories (Just like Tags)

6.) Parameters and ACL can also be used to block specific Secondary Categories from being attached to a none Admin User's Item i.e (FAQ and Admin Secondary Categories will not be added to to a None Admin Item)  

 

If used please credit this idea/concept to me! 


Tafadzwa Makura said:

I use tags! By giving tags similar names to categories and locking them so that the user cannot add their own custom tags I then allow users to add their article to one "primary" category in the category list and choose as many "category-tags" as they want in the tag list! This means that if a user/publisher publishes their article entitled "Major Health Issues Sportsman and Artists Face" and they want it to appear in the Health, Sports and Arts categories they will have to choose the primary category in the category list which in this case could be the Health category, this is where the article will be stored and linked to. If the user however adds the Sports, and Arts tags to their article the article will also appear in these categories as related items in the item layout of the Sports and Arts categories!
I haven't tried this though but i'm sure by adding the (Related Items by Tag) code block in the category list view i can also make all items that share one of their tags with the current Category appear in that Category's list! The major drawback is that users won't be able to user their own custom tags.

 
  • Tafadzwa Makura
  • Tafadzwa Makura's Avatar
30 Mar 2011 18:08
Replied by Tafadzwa Makura on topic K2 item in Multiple Categories

K2 item in Multiple Categories

Category: English K2 Community

I use tags! By giving tags similar names to categories and locking them so that the user cannot add their own custom tags I then allow users to add their article to one "primary" category in the category list and choose as many "category-tags" as they want in the tag list! This means that if a user/publisher publishes their article entitled "Major Health Issues Sportsman and Artists Face" and they want it to appear in the Health, Sports and Arts categories they will have to choose the primary category in the category list which in this case could be the Health category, this is where the article will be stored and linked to. If the user however adds the Sports, and Arts tags to their article the article will also appear in these categories as related items in the item layout of the Sports and Arts categories!

I haven't tried this though but i'm sure by adding the (Related Items by Tag) code block in the category list view i can also make all items that share one of their tags with the current Category appear in that Category's list! The major drawback is that users won't be able to user their own custom tags.

 
  • Yiota
  • Yiota's Avatar
30 Mar 2011 12:12

Placing Read more... and Published in: into one line

Category: English K2 Community

Start by creating a K2 template override. This is done by copying the folder from components/com_k2/templates and pasting it to templates/YOUR_TEMPLATE/html/com_k2/templates.

 

After that open the category_item.php located in default folder in your template folder you just copied.

Locate the catItemLinks on line 157

 

<?php if(  $this->item->params->get('catItemHits') ||  $this->item->params->get('catItemCategory') ||  $this->item->params->get('catItemTags') ||  $this->item->params->get('catItemAttachments')  ): ?>  <div class="catItemLinks">

....

end on 216 line.

And the catItemReadMore on line 264

<?php if ($this->item->params->get('catItemReadMore')): ?>    <!-- Item "read more..." link -->    <div class="catItemReadMore">        <a class="k2ReadMore" href="<?php echo $this->item->link; ?>">            <?php echo JText::_('Read more...'); ?>        </a>    </div>    <?php endif; ?>

 

Move the catItemReadMore right after the catItemLinks block (from line 264 to line 217)

Leave the rest as it is.

Save the file.

 

Now open the k2.css (which you can also copy in your template's CSS folder (templates/YOUR_TEMPLATE/css/) )

Add to the catItemLinks { float:left; margin:0 10px 16px 0; }

Then add to the catItemReadMore { float:left; (or float:right;) }
Displaying 5201 - 5220 out of 6582 results.

Powered by Kunena Forum