Keyword

Advanced Search

Search Results (Searched for: k2 Tag)

  • Ygor Rafael Ribeiro
  • Ygor Rafael Ribeiro's Avatar
10 May 2021 17:00

Mostrar 2 colunas em telas pequenas (mobile) e 4 itens para (desktop)

Category: Comunidade K2 Brasil

Olá pessoal da comunidade. =)
Essa é minha primeira postagem na comunidade espero que não seja repetido, então vamos lá.

Como exemplo eu vou usar o tema da Joomdev, ele tem o K2 instalado tem umas modificações mas a responsividade está igual o padrão K2.
Adicionei um item de menu com a opção de mostrar as categorias, coloquei para mostrar 3 colunas e 50 itens, até ai tudo bem, ele vai mostrar as 3 colunas e 50 itens, quando se muda para tela pequena ele mostra apenas 1 coluna, e eu gostaria que mostrasse 2 colunas.

Eu não sou bom em css, mas eu meio que consegui fazer, porem os itens se comportam estranhamente, eles ficam desordenados e quando digo desordenados não é a ordem dos itens, é a localização deles na tela, alguns ficam alguns pixels para baixo outros ficam com o espaço errado, enfim vira um transtorno.

Outra tentativa que fiz foi criar apenas 1 coluna e mudar o css display, mas eu sou muito leigo para falar que funcionou ou não, então estou aqui para os pro-players me ajudarem.

Em anexo tem um layout do que eu quero mas acho que já está super explicado. obrigado a todos da comunidade espero que me ajudem com uma solução simples.
  • Goble002
  • Goble002's Avatar
06 May 2021 10:11
Replied by Goble002 on topic Related items by tag on item view

Related items by tag on item view

Category: English K2 Community

Hi Fotis,

thanks, I got your point.

For newer items, I could make use of "show items by same Author" and sort by latest IDs.

I'm making use of K2 import to mass import my 300+ items (about 100+ per month on continuous basis). 200+ of them have the tag "4K download" for example. Then I have a menu item which is named "4k downloads" which will show up these 200+ items.

So to get back to my item with "pool", "hotel" & "4K download" tags, the related items will be the latest among these 200+ and won't care about the 2nd item with also "pool", "hotel" & "4K download" tags.

This is driving me nuts since all my site structure is based on show items by tags so I rely on tags.

Any workaround to change the codes to look for at least 2 common tags before being output in 'related items by tags' ?
  • JoomlaWorks
  • JoomlaWorks's Avatar
05 May 2021 21:30
Replied by JoomlaWorks on topic Related items by tag on item view

Related items by tag on item view

Category: English K2 Community

K2 searches for related items based on the tags of the item you're viewing. Once the items are matched, we fetch their data and sort them by ID (descending). This means that newer items will show up first rather than items that match more tags. This makes sense especially on media sites where you wish to show the most recent "relevant" (by tag) items.

The code to explore is here: github.com/getk2/k2/blob/master/components/com_k2/models/itemlist.php#L599
  • Goble002
  • Goble002's Avatar
05 May 2021 19:29
Related items by tag on item view was created by Goble002

Related items by tag on item view

Category: English K2 Community

Hello,

Example:
On item page: I show 5 related items. I have 40 items in all. 20 of them are tagged "hotel". 2 of them are tagged "hotel" + "pool".

In item view for one of these 2 items I would expect, the 2nd one (also tagged as "hotel" + "pool") would show up first since they are more related than the 18 others. But it seems that it's not how k2 behaves.

Among the 5 related items, it will show up those tagged "hotels". Is there any work around to display items which are more related first ?
  • JoomlaWorks
  • JoomlaWorks's Avatar
05 May 2021 03:32
Replied by JoomlaWorks on topic Failed loading XML

Failed loading XML

Category: Simple RSS Feed Reader

Chrome latest on macOS.

The test site seems to load just fine now.

I checked this tag URL:
www.uab.edu/k2test2/arts/itemlist/tag/education

And as you also mentioned, its equivalent feed page renders an error:
www.uab.edu/k2test2/arts/itemlist/tag/education?format=feed

Since the problem is masked by the redirect to your default site error page, I used cURL to fetch the feed page without the redirect. This revealed the following error:
Call to undefined method Joomla\CMS\Document\FeedDocument::addCustomTag()

Now, K2 uses this method in one place only: github.com/getk2/k2/blob/dd3a4c9070f7f1628a0c622e4c4c2996f1e2f630/administrator/components/com_k2/helpers/html.php#L396

And this is actually the backend, so it's not K2.

My guess is some plugin uses that method to inject something to the document <head>. The problem is that this plugin does not check for "context": is this a regular HTML output or is a feed or json output?

So look for the word "addCustomTag" in your site's /plugins folder and you should spot the rogue plugin. It's most likely something that appends (duh) something in the <head>, e.g. for analytics or other stuff that would normally be injected there.
  • JoomlaWorks
  • JoomlaWorks's Avatar
29 Apr 2021 02:01
Replied by JoomlaWorks on topic K2 fresh user template problems

K2 fresh user template problems

Category: English K2 Community

Your K2 template overrides have unclosed </div> tags. That's why the layout breaks. See how it looks on Protostar (hint: just fine): funnystash.com/?template=protostar
  • Heather
  • Heather's Avatar
28 Apr 2021 17:04 - 28 Apr 2021 17:05
Replied by Heather on topic Failed loading XML

Failed loading XML

Category: Simple RSS Feed Reader

This is part of our problem, uab.edu/k2test2 is a clone of our news site, uab.edu/news.

The difference is k2test2 has the most current version of K2 on it and /news still has the 2.9 series of k2.
When we update the news site our feeds break.

These are the same site, cloned a few weeks ago so content will have been added but this feed should work.
Except k2test2 is update to 2.10 series of k2 and news is not.

www.uab.edu/k2test2/component/k2/itemlist/tag/academics?format=feed&limitstart=&type=rss
www.uab.edu/news/component/k2/itemlist/tag/academics?format=feed&limitstart=&type=rss
 
  • JoomlaWorks
  • JoomlaWorks's Avatar
26 Apr 2021 21:25
Replied by JoomlaWorks on topic Intro Text as Alt Tag in item view

Intro Text as Alt Tag in item view

Category: English K2 Community

That function will convert certain characters to their HTML entity equivalents. To strip any tags change K2HelperUtilities::cleanHtml($this->item->introtext) to K2HelperUtilities::cleanHtml(strip_tags($this->item->introtext)).
  • JoomlaWorks
  • JoomlaWorks's Avatar
26 Apr 2021 21:09
Replied by JoomlaWorks on topic Remove folder image in categories

Remove folder image in categories

Category: English K2 Community

Instead of having me search the site for a tag, you could have provided me with a direct URL to some K2 page... I can then examine the tags links there and tell you if there is a problem specific to K2 or it's something else.
  • Goble002
  • Goble002's Avatar
26 Apr 2021 14:48
Intro Text as Alt Tag in item view was created by Goble002

Intro Text as Alt Tag in item view

Category: English K2 Community

Hello,

My front-end users would generally create items as follows :
Title : Sunset
Intro Text : Beautiful sunset on the beach with waves
Image caption : "They will skip this field"

I wanted to find a way to use Introtext as alt tag for images. The original code:
<img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" />
So I changed :
K2HelperUtilities::cleanHtml($this->item->title)
to:
K2HelperUtilities::cleanHtml($this->item->introtext)

Was thinking that the cleanHtml script would strip the tags <p> so that Intro text : 
"<p>Beautiful sunset on the beach with waves</p>"
becomes
"Beautiful sunset on the beach with waves" for alt.

thanks for clarifying.
  • Gerold
  • Gerold's Avatar
24 Apr 2021 19:41
Remove folder image in categories was created by Gerold

Remove folder image in categories

Category: English K2 Community

Hello,
first I have tried to ask the german-community regarding my k2-problem, but actually nobody left me a message. So maybe in the english-community has an Idea how to solve my problem?

please help me. In my blog menu under "keywords" there is a 404-problem.
Have al look at: www.bio-vita.at/index.php/de/blog

At the moment I have only created texts for 2 categories and therefore also for 2 keywords.
If you click on the tag "Marc M Galal - Life & BusinessMentor #1" under the left menu "Keywords" you get a 404 message.
(www.bio-vita.at/index.php/de/blog/itemlist/tag/Marc%20M%20Galal%20%E2%80%93%20Life%20&%20BusinessMentor%20#1)

With the tag "Karma Samphel Ling", however, the menu item works perfectly.
(www.bio-vita.at/index.php/de/blog/itemlist/tag/Karma%20Samphel%20Ling)

I have compared the posts-settings at the backend, but I didn´t found any discrepancy in the settings. Do you have any idea how to solve this problem?

Many thanks for the help, Gerold
 
  • JoomlaWorks
  • JoomlaWorks's Avatar
23 Apr 2021 02:39
Replied by JoomlaWorks on topic Display items with same tags only

Display items with same tags only

Category: English K2 Community

This is a template issue, it's not a K2 issue. Contact your template provider.
  • Trevor J Ellis
  • Trevor J Ellis's Avatar
19 Apr 2021 12:28 - 19 Apr 2021 13:40
K2 Users crawled by Google was created by Trevor J Ellis

K2 Users crawled by Google

Category: English K2 Community

We have encountered a MAJOR security flaw where people can easily find part of the site that we want hidden. If this isn't the right forum, please let me know where to post it.We are using the K2 component extension with the Uber template. When somebody Google searches our website + SuperUser (see Img01). They are able to find a list of all the K2 items created by that user (see Img02).We DON'T want Google (or any search engine) to index these pages for any user. Can we either disable these list pages or alternatively, just stop Google from indexing them? Do we need to use a robots.txt to achieve this? Any help would be greatly appreciated!

UPDATE: We have found part of a solution here - www.joomlart.com/forums/d/35521-remove-author-meta-tag-on-k2-items/2. We disable Show Author Meta Tag in the Global Config for the Joomla site. When Google nexts recrawls the site, will it lose these pages from the indexing or do we need to request a full manual recrawl from Google webmaster?
  • Heather
  • Heather's Avatar
16 Apr 2021 22:42 - 19 Apr 2021 17:53
Failed loading XML was created by Heather

Failed loading XML

Category: Simple RSS Feed Reader

Ok, we have several sites using K2 and RSS Feed Reader.
I have a case where one site, if updated to the latest version of K2, no longer works with RSS Feed Reader. 
This site has the latest version of Joomla and RSS Feed Reader, I have set up reading feeds from two different sites with the latest version of K2. 
www.uab.edu/rsstest/

The sources:

www.uab.edu/k2test

www.uab.edu/k2test2

Both have latest version of Joomla 3.9.25 & K2 2.10.3 
Both feeds have been checked as valid from validator.w3.org/ and have results, not empty feed.

www.uab.edu/k2test/component/k2/itemlist/tag/psychology?format=feed&limitstart=&type=rss

www.uab.edu/k2test2/component/k2/itemlist/tag/athletics?format=feed&limitstart=&type=rss  

The second feed, from k2test2 does not show, this is the site when updated to K2 no longer works. 
Any feed created off this site breaks.

 Following off this ticket with developer: www.joomlaworks.net/forum/simple-rss-feed-reader/57572-warning-failed-loading-xml?start=10  

I have checked and the "FTP layer" is not enabled on either site in the Global Configuration settings.

Testing if the allow_url_fopen is disabled on our hosting account, using the code provided:

<?phpif (ini_get('allow_url_fopen')) {echo 'allow_url_fopen is enabled';} else {echo 'allow_url_fopen is disabled';}

All sites show allow_url_fopen is enabled 

Next step, contacted our server provider:

Look in .htaccess, php.ini or .user.ini files for anything that could affect remote connecting for your site, e.g. socket_set_timeout or stream_set_timeout.If that is set to 0, you need to change it to the default of 90 seconds.

Response from provider:

The default timeout for socket based streams in php 7.2 is 60 seconds and that is its current setting. This is however defined by the setting 'default_socket_timeout'. Both 'socket_set_timeout' and 'stream_set_timeout' appear to be functions that can be called in code but are not php.ini settings. If you want us to adjust the default to 90 let me know.


Is this something I need to ask our server provider to change, will it make a difference?
Thanks,
Heather 
  • JoomlaWorks
  • JoomlaWorks's Avatar
16 Apr 2021 03:30
Replied by JoomlaWorks on topic Prevent changes to images by K2 upload

Prevent changes to images by K2 upload

Category: English K2 Community

When you upload to resize an image, you should be able to set a given quality percentage. GD however is not the best image processor and as such can result in larger files in some cases, e.g. if you upload a carefully crafted 1000px image (on Photoshop) and the resizing is also 1000px. The resulting file will be larger indeed. But this is an edge case. People use K2 so they don't have to care about image processing. Upload the image and off you go.

P.S. The code you see are the defaults of that class. There are overridden when the class is called.
  • Electronic Beatz Network
  • Electronic Beatz Network's Avatar
15 Apr 2021 16:44
Replied by Electronic Beatz Network on topic How to create a new custom Extrafield-Type?

How to create a new custom Extrafield-Type?

Category: English K2 Community

Thanx for the answere.

I solved it with a dirty workaround like this to output just the value (from field id 55) without the generated input-field/HTML-Tag.

$LabelName = explode("<input type=\"text\" name=\"K2ExtraField_55\" id=\"K2ExtraField_55\" value=\"", $custom_field->LabelName->element);
$LabelName = explode("\"", $LabelName[1]);
$LabelName = $LabelName[0];

With this I could create a db-output for a custom dropdown (with the previous valueselected)

<option value="<?=$singleOrganisation[1]?>"<? if ($singleOrganisation[1] == $LabelName) { echo " selected=\"selected\""; } ?>><?=$singleOrganisation[1]?></option><? } ?>

  • Electronic Beatz Network
  • Electronic Beatz Network's Avatar
15 Apr 2021 16:37
Subtemplates > itemform.php ist not working was created by Electronic Beatz Network

Subtemplates > itemform.php ist not working

Category: English K2 Community

Hi.

I followed these steps and the creating of subtemplates for different categories works.
getk2.org/documentation/tutorials/templating-with-k2-and-the-concepts-of-sub-templates

The files "category.php", "category_item.php", "item.php" and "tag.php" are sellected correct (via category-options in the backend).

But... the frondend-editing ("itemform.php") is always using the file from "components\com_k2\templates\default\" and not (for example) from "templates\ebn\html\com_k2\artists\".

Is that a bug or - when not - how can I make it work like the other files?

Thanx, Florian
  • JoomlaWorks
  • JoomlaWorks's Avatar
06 Apr 2021 18:56
Replied by JoomlaWorks on topic Replace space by dash in K2 Tags

Replace space by dash in K2 Tags

Category: English K2 Community

If you insert a tag as 2 words, then it's stored as a 2-word tag. You can't change this.

Tags are evaluated on-the-fly if they exist in the database (and pass various tests for validity and security).
  • Goble002
  • Goble002's Avatar
06 Apr 2021 16:46
Replied by Goble002 on topic Replace space by dash in K2 Tags

Replace space by dash in K2 Tags

Category: English K2 Community

Hi Fotis,

any thoughts on this will be highly appreciated.

Am stuck with publishing my website because of search engines indexing / sharing links that might no longer exist.
  • JoomlaWorks
  • JoomlaWorks's Avatar
05 Apr 2021 23:04
Replied by JoomlaWorks on topic HTML stripping for Tiny MCE

HTML stripping for Tiny MCE

Category: English K2 Community

Use K2's content cleanup options only. In there, list the most basic HTML tags NOT to strip (e.g. p,a,i,b etc.).

This will ensure K2 always has the last word when it comes to content cleanup.
Displaying 121 - 140 out of 6582 results.

Powered by Kunena Forum