Here is a better way to accomplish what you wanted by using javascript. Not sure if you wanted to change center box image too if not let me know.
See below for what it does.
1. Center box no 5 , replaces image, removes titles, removes link, removes hover image and any elements with it.
2. Last box no 9, replaces image, replaces link, replaces title, removes hover image and any elements with it.
You need to bring your website back to original by undoing what we have done in previous posts, disable any extra modules you have created, edit original module and set its row back to 3, remove any override.css so we are back to original style with 9 boxes.
Step1. Add JQuery
Find File: \templates\gk_myfolio\layouts\blocks\head.php
Find Line: 102 and 103 which is below
- Code: Select all
// include JavaScript
$this->addJS($this->URLtemplate() . '/js/gk.scripts.js');
Replace with below
- Code: Select all
// include JavaScript
$this->addJS($this->URLtemplate() . '/js/gk.scripts.js');
$this->addJS('http://code.jquery.com/jquery-latest.js');
Step2. Add our script.
Find File: \templates\gk_myfolio\layouts\blocks\footer.php
Find Line: Add it at the end of the file.
Add below script
- Code: Select all
<script>
$(document).ready(function () {
var img1 = $(".tleft .fleft").eq(4);
var link1 = $("div.gallery .nspArt > div > a").eq(4);
img1.attr('src','http://demo.gavick.com/joomla16/aug2011/modules/mod_news_pro_gk4/cache/k2.items.cache.1c0ae2205709722b62e843abc0471a55_Lnsp_207.jpg');
img1.removeAttr('title');
link1.removeAttr('href');
link1.removeAttr('title');
$("div.nspContainer").eq(4).remove();
var img2 = $(".tleft .fleft").eq(8);
var link2 = $("div.gallery .nspArt > div > a").eq(8);
img2.attr('src','http://demo.gavick.com/joomla16/aug2011/modules/mod_news_pro_gk4/cache/k2.items.cache.f710044bf79a4b1f5d8b085e5e5d9711_Lnsp_207.jpg');
img2.attr('title','Click For More News');
link2.attr('href','http://www.gavick.com');
link2.attr('title','Click For More News');
$("div.nspContainer").eq(7).remove();
});
</script>
Tip: You can use any means to include your javascript in to your joomla. Such as using modules to include your script on specific pages. See joomla extensions for more info.
That's it, see below on how to change boxes, images, titles, links etc...
Usage:
Our script selects box no5 by using below. Scripts starts from "0" so our fifth box becomes "4" in script so ".eq(4);" is our 5 box. Formula is n-1=x, ".eq(x);"
var img1 = $(".tleft .fleft").eq(4);
For other users want to change box selection to change it to their usage simply change its box number as above.
Change following samples with your own links, text, image url etc.
Image
- Code: Select all
http://demo.gavick.com/joomla16/aug2011/modules/mod_news_pro_gk4/cache/k2.items.cache.1c0ae2205709722b62e843abc0471a55_Lnsp_207.jpg
http://demo.gavick.com/joomla16/aug2011/modules/mod_news_pro_gk4/cache/k2.items.cache.f710044bf79a4b1f5d8b085e5e5d9711_Lnsp_207.jpg
Title
- Code: Select all
Click For More News
Link
- Code: Select all
http://www.gavick.com
Optional: Also see below link for customized css for each box
- Code: Select all
https://www.gavick.com/forums/133/solved-remove-launch-project-11117.html?p=71391#p71391
See you around...
---------------------------------------
Search Terms:
Myfolio edit boxes.
My folio chage link
Myfolio change image
News Show Pro My Folio change image change link