joomla-k2

Joomla 3 Plugin Design

霸气de小男生 提交于 2020-01-26 04:16:20
问题 Does anybody know of any good references/tutorials for plugin/extension design for Joomla 3? I'm struggling to find up to date information. Specifically I want to make a plugin to extend the K2 registration functionality so information on how to integrate plugins with other Joomla extension would also be great! I'm reasonably proficient with php but I've only started to look at Joomla code so maybe that's worth considering! 回答1: For Joomla! specific information use the Joomla Docs website at

Joomla - Where is the code in K2 which saves a new item's Title and alias

白昼怎懂夜的黑 提交于 2020-01-24 15:06:08
问题 I have looked every where in the administrator\components\com_k2 folder but am not able to find the code that saves a new item\article in K2. I checked the item.php file under models folder. No luck. I need to override the K2 item save method. I need a know the exact method that saves the Item's title and alias into the #__K2_content table. I have to duplicate the K2 items in joomla articles on save and remove on trash/delete. I have successfully been able to override the K2 core code. But am

PHP variable from external file?

左心房为你撑大大i 提交于 2019-12-31 05:41:53
问题 *EDIT / FINISHED SOLUTION / WORKING CODE So, this is what a friend of mine helped me come up with. Here is the part I use in my K2 "items.php" file: <div class="fb-comments" data-href="<?php echo JURI::current(); ?>" data-num-posts="8" notify="true" data-width="580"></div> <input id="authname" style="display: none;" type="text" value="<?php echo $this->item->author->name; ?>" /> <input id="authmail" style="display: none;" type="text" value="<?php echo $this->item->author->email; ?>" /> <input

K2_content module rating

扶醉桌前 提交于 2019-12-23 17:24:35
问题 I've been reconstructing the standard K2 rating in the category_item.php to view ratings from to show as stars to show as number. What I did was, I replaced this code: <?php if($this->item->params->get('catItemRating')): ?> <div id="catItemRatingBlock"> <div class="itemRatingForm"> <ul class="itemRatingList"> <li class="itemCurrentRating" id="itemCurrentRating<?php echo $this->item->id; ?>" style="width:<?php echo $this->item->votingPercentage; ?>%;"></li> <li><a href="#" rel="<?php echo

Making SEF URLs with K2 v2.6.5

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 08:12:25
问题 I'm using Joomla 2.5.1 along with K2 2.6.5. I am trying to figure out how to use SEF urls in K2. I have my site with the 'real' folder 'coolmovies'. Joomla controls this folder. Within K2, I have a category alias='scifi', within which I have an item alias='startrek' and 'startrek' has the item id 42. Currently this url works: http://mycoolsite.com/coolmovies/42-startrek I update the SEF settings for K2 to the following: In theory, this should now work: http://mycoolsite.com/coolmovies/scifi

PHP variable from external file?

好久不见. 提交于 2019-12-02 09:41:56
*EDIT / FINISHED SOLUTION / WORKING CODE So, this is what a friend of mine helped me come up with. Here is the part I use in my K2 "items.php" file: <div class="fb-comments" data-href="<?php echo JURI::current(); ?>" data-num-posts="8" notify="true" data-width="580"></div> <input id="authname" style="display: none;" type="text" value="<?php echo $this->item->author->name; ?>" /> <input id="authmail" style="display: none;" type="text" value="<?php echo $this->item->author->email; ?>" /> <input id="link" style="display: none;" type="text" value="<?php echo JURI::current(); ?>" /> <script> window

Where does k2 component store its images in the database?

吃可爱长大的小学妹 提交于 2019-11-29 13:59:50
问题 I want to retrieve/query images stored by joomla k2 component (under the Image Tab). 回答1: To display the K2 item image you can use this echo "media/k2/items/cache/".md5("Image".K2 ITEM ID HERE)."_XL.jpg"; 回答2: It's not stored in the database at all. They use the md5 hash on the actual K2 item ID, and that is how they rename and save the image in the folder media/k2/items/cache/ . Anywhere the K2 item is pulled up, they use JFile::exists (which is used to check if a file exists in the path set