Keyword

Advanced Search

Search Results (Searched for: K2 Power Tip)

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
28 Jun 2015 23:45
Replied by Krikor Boghossian on topic K2 Power Tip: Add Offset to Smooth Scroll Anchors - K2 Hack

K2 Power Tip: Add Offset to Smooth Scroll Anchors - K2 Hack

Category: English K2 Community

Joe,

We really need to talk about phrasing.
K2 Hack will make a lot of people (including my self) nervous about being hacked.

On the other note, this is not even a hack. You can override the js file.
Simply unset the file in the template and include your own copy.

Finally you can make this dynamic with jQuery 's height() function.
api.jquery.com/height/

You can dynamically calculate the offset with the use of that function.

Let me know if you need an example.
  • Joe Campbell
  • Joe Campbell's Avatar
27 Jun 2015 05:12

K2 Power Tip: Add Offset to Smooth Scroll Anchors - K2 Hack

Category: English K2 Community

Do you find that using anchors leaves some content hidden or cut off by your fixed top menu? I did, but I figured out how to fix this issue - Warning - it requires hacking your K2 component JavaScript file. Here's how...

File: components/com_k2/js/k2.js

Find: section labeled as "Smooth Scroll"

Add: "- 70" or whatever number works for your template fixed menu

Also: add a comment to remind you what/how you hacked the file

The result should be...
scrollTop: $K2(target).offset().top - 70 //HACK: added - 70 to compensate for fixed menu
  • Krikor Boghossian
  • Krikor Boghossian's Avatar
22 Jun 2015 13:38
Replied by Krikor Boghossian on topic K2 Power Tip: Change Extra Field Date format - K2 Hack

K2 Power Tip: Change Extra Field Date format - K2 Hack

Category: English K2 Community

Hmm, I have to agree with you.
Changing all other dates will take too much time.
  • Joe Campbell
  • Joe Campbell's Avatar
19 Jun 2015 17:27

K2 Power Tip: Change Extra Field Date format - K2 Hack

Category: English K2 Community

I know hacking the core is bad, but wouldn't changing the Language File as you suggested create a "Global" change?

In my case (as possible with others) I only want to change the date format for the extra fields and nowhere else.
  • Krikor Boghossian
  • Krikor Boghossian's Avatar
19 Jun 2015 16:17
Replied by Krikor Boghossian on topic K2 Power Tip: Change Extra Field Date format - K2 Hack

K2 Power Tip: Change Extra Field Date format - K2 Hack

Category: English K2 Community

Hello Joe,

This is actually a core file edit.
It is best to use language overrides, since you will lose your edits when you update.
  • Joe Campbell
  • Joe Campbell's Avatar
19 Jun 2015 03:16

K2 Power Tip: Change Extra Field Date format - K2 Hack

Category: English K2 Community

If you're ok with hacking K2, you can modify the date format of the Extra Field Date:

File:
/components/com_k2/models/item.php

Find:
$value = JHTML::_('date', $value, JText::_('K2_DATE_FORMAT_LC'), $offset);

Replace K2_DATE_FORMAT_LC with the format that you desire, for example: l d F Y [or] mdY

Check this article by Steven Johnson (Intown Web Design) for date options/ideas:
www.jbeginner.com/tutorials/extensions/how-to-format-the-k2-date-time/
  • Joe Campbell
  • Joe Campbell's Avatar
18 Jun 2015 02:03
Replied by Joe Campbell on topic K2 Power Tip: Customize Your K2 Back-End Experience

K2 Power Tip: Customize Your K2 Back-End Experience

Category: English K2 Community

Hello William, Thank you for bringing that error to my attention. I have corrected it. Also - Thank You for your many contributions to the Joomla K2 Community :)
  • william white
  • william white's Avatar
18 Jun 2015 00:55
  • Joe Campbell
  • Joe Campbell's Avatar
17 Jun 2015 09:44 - 18 Jun 2015 02:02

K2 Power Tip: Customize Your K2 Back-End Experience

Category: English K2 Community

Use CM K2 Inline to customize your K2 back-end item list page:

- Show/Hide columns you want to see (title, published, ID, featured, etc.)
- Edit extra fields inline
- Batch edit extra fields
- Order columns as desired

What does this all mean:

- You can have a simple & clean item list page
- Simplify the item list page (workflow, pefect for low-tech clients)
- batch process (filter items then modify multiple items at once)

Best of all they offer clear & detailed instructions:
cm-k2-inline.readthedocs.org/en/latest/

One more best of all, I posted a few questions and suggestions on the developers forum and received a response in less than 24 hours.

Lean more about CM K2 Inline here:
www.extensions.joomla.org/extensions/extension/extension-specific/k2-extensions/cmk2inline

Make sure to check out the DEMO to experience it
  • Joe Campbell
  • Joe Campbell's Avatar
28 May 2015 14:39 - 28 May 2015 14:39
K2 Power Tip: Using PHP in Extra Fields was created by Joe Campbell

K2 Power Tip: Using PHP in Extra Fields

Category: English K2 Community

If you're anything like me, you're using to leverage its Extra Fields. But the are you using K2's Extra Fields to the fullest (using it to render all images, meta data, etc.) If so, or if you intent to, then you need to know this trick...

Thank's to NoNumber Sourcerer, you can utilize PHP in your extra fields. It's simple, just wrap your PHP code with it's tag, like this...

{source 0}<?php echo '<p>Joomla, K2 & NoNumber Rocks!!!</p>'; ?>{/source}

The uses are limitless, for me, I am using it to generate random content bases on extra fields.

Here's the link to NoNumber Sourcerer
bit.ly/1FPPRf8

Here's my post on how to randomize extra field content
bit.ly/1FPPQYA
  • Joe Campbell
  • Joe Campbell's Avatar
28 May 2015 14:34 - 28 May 2015 14:43
K2 Power Tip: Randomize Extra Field Output was created by Joe Campbell

K2 Power Tip: Randomize Extra Field Output

Category: English K2 Community

It's time to bring your Joomla K2 website to the next level - How? By randomizing your extra field output, that's how.

Nobody wants to experience that same thing over & over. Variety is the spice of life - right?
This wise quote holds true for your website. By randomizing your content, you can create a unique experience for your visitors.

Here's the Copy & Paste code to randomize your extra field output:
<?php $input = array("AAA", "BBB", "CCC"); $rand_keys = array_rand($input, 2); echo $this->item->extraFields->$input[$rand_keys[0]]->value; ?>

I am using this to randomize call-to-actions, greetings and thank you messages.

Do you have any cool ideas on how to utilize this tip? If so, please share (because sharing is caring :)
  • Lefteris
  • Lefteris's Avatar
08 May 2015 19:50

K2 Power Tip: Change Related Items Order to Random - K2 Hack

Category: English K2 Community

@Joseph

The query has already a limit applied ( the number of related items you want to show ) .

It's the random ( RAND() function ) implementation of MySQL that takes that much time since it needs to parse all entries in the table.
  • Joe Campbell
  • Joe Campbell's Avatar
07 May 2015 13:41

K2 Power Tip: Change Related Items Order to Random - K2 Hack

Category: English K2 Community

Thanks for the compliment.

Please provide the code for setting the limit.
  • Krikor Boghossian
  • Krikor Boghossian's Avatar
07 May 2015 13:23
Replied by Krikor Boghossian on topic K2 Power Tip: Change Related Items Order to Random - K2 Hack

K2 Power Tip: Change Related Items Order to Random - K2 Hack

Category: English K2 Community

This is nice Joe.
If you set a limit to the items, then you won't have any issues.
  • Joe Campbell
  • Joe Campbell's Avatar
06 May 2015 22:37

K2 Power Tip: Change Related Items Order to Random - K2 Hack

Category: English K2 Community

Don't let site visitors see the same related items. If they do, they might start ignoring that area of your site. This quick & easy hack will randomize the results of your related items.

Note: use caution if your website is extremely large, as this may slow down the rendering of your item pages.

File: components/com_k2/models/itemlist.php

Find the following code...
 $query .= " AND c.trash = 0 AND (i.id) IN ({$sql}) ORDER BY i.created DESC";

Replace ORDER BY i.created DESC"; >>> with >>> ORDER BY RAND()";
resulting in the following code:

$query .= " AND c.trash = 0
AND (i.id) IN ({$sql})
ORDER BY RAND()";

Special thanks to www.joomreem.com (@JoomReem) for helping with this hack
  • Joe Campbell
  • Joe Campbell's Avatar
01 May 2015 23:48

No Image on Facebook ... No Image, Title, or Description Whe

Category: English K2 Community

Hi Andre,

I would recommend removing the OG tags produced by K2 and use sh404SEF social tags (as it made for to render all of your social tags)

Here are two examples of OG tag conflict/issues with using both K2 & sh404SEF currently on your website:
supconnect.com/tag/fishing - Duplicate URL, title & type OG tags
supconnect.com/ - No OG tags

Here is a post that I put up a little while ago that provides instructions on how to remove K2 OG tags (note: it's a Hack):
www.joomlaworks.net/forum/k2-en/41210-k2-power-tip-remove-open-graph-meta-k2-hack

Lastly, by using sh404SEF for all of your social tag needs, you have the ability to better manage your K2 tag pages (which I see you use heavily)
K2 tags currently do not have images which means it can not render a social tag image.

I hope this helps,

Joe Campbell
  • Joe Campbell
  • Joe Campbell's Avatar
21 Apr 2015 16:01

K2 Power Tip: Remove Open Graph Meta - K2 Hack

Category: English K2 Community

This is a vital hack if your using another extension to add Open Graph meta tags or if you choose to use K2 extra fields to power your meta tags (my preference)

Files:
/components/com_k2/views/item/view.html.php
/components/com_k2/views/latest​/view.html.php

Instructions:
Search for "og:" and comment out with "//", for both files

Source:
pastebin.com/iSKmKqbv
  • Joe Campbell
  • Joe Campbell's Avatar
07 Apr 2015 06:19 - 07 Apr 2015 06:19

K2 Power Tip: Use Image Extra Field for any File Type

Category: English K2 Community

If you're like me and use Extra Fields for just about any and everything on your site, then you know there needs to be a "File" extra field type. Which such you would be able to "select" files such as: PDF, MP3, DOCX, MP4, etc from instead of using the textfield types which requires finding the file path and then pasting it into the textfield.

This requires hacking K2, but for me this is a necessary evil. I comment the code and add each hack to a Website Documentation file to archive each hack that I perform.

File: /administrator/components/com_k2/models/extrafield.php

Remove: &type=image
From: index.php?option=com_k2&view=media&type=image

I welcome any proficient K2 programmer to provide a plugin so we would not need to hack the code to receive this functionality.

Note: I have submitted a request for a "File" extra field type in K2v3
github.com/joomlaworks/k2-v3-dev-build/issues/113
  • Joe Campbell
  • Joe Campbell's Avatar
06 Apr 2015 14:58

K2 Power Tip: Stop K2 from Processing Images - K2 Hack

Category: English K2 Community

Try removing the Item image options size(s) from the category.

Make sure to copy & save to place back if you need to.
  • Mika Knuutila
  • Mika Knuutila's Avatar
06 Apr 2015 14:55
Replied by Mika Knuutila on topic K2 Power Tip: Stop K2 from Processing Images - K2 Hack

K2 Power Tip: Stop K2 from Processing Images - K2 Hack

Category: English K2 Community

Really waiting K2v3 which have ImageMagick option :)
Displaying 41 - 60 out of 100 results.

Powered by Kunena Forum