Support Forum

  • Page:
  • 1

Rollover to K2 custom field

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Does anyone have an idea how to get the roll over message on Captify Content to show a K2 custom Field instead of category/item title. Basically I'd like to roll over to a one-line summary or slogan of content item that isn't nessesarly present in the intro text of the item. Ideas?
  • wesleym's Avatar
  • wesleym
  • 3 Month Basic
  • 43 posts
  • Karma: 0
The administrator has disabled public write access.
Hi Wesley,

Its certainly possible but requires a bit of hacking of the helper.php file. modules/mod_captify/helper.php.

You will need to look in the database and swap the title row for the extra fields row.

I just had a quick look and I think its this line:

$item->title = $item->name;

But I havent tested it.

Best of luck.

Anthony
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
Thanks Anthony. I'll start there. I'll reply back here if I have any success with it.
  • wesleym's Avatar
  • wesleym
  • 3 Month Basic
  • 43 posts
  • Karma: 0
The administrator has disabled public write access.
Hi Wesley,

It would be good to know - I know it would be handy for other users.

Cheers and Thanks
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
I'm just now getting a chance to try this out. Hopefully will have some results over the weekend.

Another modification question. Does anyone have a lead on making the title roll over turn 90 degrees. I'm planning a single row of tall narrow thumbs (100wx300h) and it would be cool to have the titles appear from the right edge with the text turned 90 degrees. Any ideas.
  • wesleym's Avatar
  • wesleym
  • 3 Month Basic
  • 43 posts
  • Karma: 0
The administrator has disabled public write access.
Ah, css is your friend here.
snook.ca/archives/html_and_css/css-text-rotation
IE6 might be troublesome but it is about time the world stopped caring about it.
Good luck.

Cheers,
Jason.
  • Jason D's Avatar
  • Jason D
  • 6 Month Developer
  • 2957 posts
  • 12 Thanks
  • Karma: 75
The administrator has disabled public write access.
I'm trying to get this to work.

Idealy I'd like the title and intro in there.

// Item text

$item->title = $item->name;

tried changing that too

// Item text

$item->introtext = $item->name;


but it didn't seem to do anything. care to elaborate just a bit more on this one.

thanks
  • B Smith's Avatar
  • B Smith
  • 12 Month basic
  • 397 posts
  • 2 Thanks
  • Karma: 0
The administrator has disabled public write access.
Hey,

The code will depend on your custom field.
If you can tell me the details of your custom field I might be able to direct you better.

Cheers,
Jason.
  • Jason D's Avatar
  • Jason D
  • 6 Month Developer
  • 2957 posts
  • 12 Thanks
  • Karma: 75
The administrator has disabled public write access.
Thanks Jason, sorry I wasn't clear.

I'd like to include "introtext", below the title.

the previous poster wanted an extra field. Sorry for the confusion.
  • B Smith's Avatar
  • B Smith
  • 12 Month basic
  • 397 posts
  • 2 Thanks
  • Karma: 0
The administrator has disabled public write access.
You'll need to edit the tmpl/default.php file

Where you have

<?php if($titleBelow) {?>

<a class="captifyTitle" href="<?php echo $item->link;?>">

<?php echo $item->title;?>

</a>

<?php }?>

you can replace it with

<?php if($titleBelow) {?>

<a class="captifyTitle" href="<?php echo $item->link;?>">

<?php echo $item->text;?>

</a>

<?php }?>

That should do it. Remember to set the title to show below the image in the parameters.

Cheers,
Jason.
  • Jason D's Avatar
  • Jason D
  • 6 Month Developer
  • 2957 posts
  • 12 Thanks
  • Karma: 75
The administrator has disabled public write access.
Ok, we're still not on the same page.

I want the intro text to appear on the mouseover, below the title.

not on the title below the image, when that is set. in this case it is not.

sorry for not being clear on this.
  • B Smith's Avatar
  • B Smith
  • 12 Month basic
  • 397 posts
  • 2 Thanks
  • Karma: 0
The administrator has disabled public write access.
Hi B,

This edit is actually slightly harder than it sounds because the overlay is derived from the alt text in the code and you would need to sanitise the intro text in order to get it to work properly.

Basically if you look at around line 459 you will see this code:
<img src="<?php echo resizeImageHelper::getResizedImage('/'.$firstImage, $image_width, $image_height, $option); ?>" class="captify captify<?php echo $module_id ?>" alt="<?php echo $item->title; ?>" <?php if ($imageDimensions) { ?>style="height:<?php echo $image_height ?>px;width:<?php echo $image_width ?>px" <?php } ?> />

If you change the:
alt="<?php echo $item->title; ?>" 

to:
alt="<?php echo $item->text; ?>"

You will see that it can output the intro text but it's problematic deepening on whats in your intro text.

Helping any further with this is not really something we can do here on the forum or ticket system though - but it should get you headed in the right direction.

Thanks Anthony
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
Ok, thanks for the extra help on this.

Perhaps I could accomplish it with an extra field, instead of introtext. If that would be simpler.
  • B Smith's Avatar
  • B Smith
  • 12 Month basic
  • 397 posts
  • 2 Thanks
  • Karma: 0
The administrator has disabled public write access.
Sure that sounds like ti would work.

That kind of customisation is beyond the scope of the forum though and not sure that I can add any more current work to the Joomlabamboo load. You may be able to contact Jason directly and he may be able to help you with this.

Just ping back here if you would like him to contact you and I will forward your email to him.

Cheers Anthony
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers