Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#277 2010-01-26 00:11:11

Something Clever
New Member
Registered: 2009-03-26
Posts: 8

Re: hak_article_image

Adding in offset=“1” causes an error to show up that reads: “a[ 0 ] is undefined” Source File: http://(sitename)js/jscarousellite_1.0.1.min.js – Line 1
Removing offset makes the error disappear.

(If it were on a public server I’d post the address. Thanks again for trying while operating blind!)

Last edited by Something Clever (2010-01-26 00:22:43)

Offline

#278 2010-01-26 01:00:49

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: hak_article_image

yeah that sounds like whatever element collection jcaroussel is trying to get is not actually getting populated somehow.

From looking at the jCaroussel code it looks like the li’s are not getting grabbed properly. I’m trying to match the minified error to the non minified source so this could be off. In firebug try doing

console.log($("divselector ul li")) 

and see what comes back. Replace divselector with however you are attaching jcaroussel to the div. It definitely seems like something is getting screwy with the markup.


Shoving is the answer – pusher robot

Offline

#279 2010-01-26 01:40:24

Something Clever
New Member
Registered: 2009-03-26
Posts: 8

Re: hak_article_image

Hopefully this is what you meant… The first carousel in list view is div.projectcarousel17 so…

>>> console.log($(“div.projectcarousel17 ul li”))

comes back with ….

[li, li, li, li, li]

Offline

#280 2010-01-26 01:47:24

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: hak_article_image

Well that looks right so I have no idea how it’s coming up with it being undefined from that. Not really sure what else to try at this point, since I’m not really familiar with what jCaroussel is doing. At this point I can only suggest poking through the debugger with the uncompressed version and figuring out what is failing, but that’s not real helpful if you haven’t done that sort of thing before.


Shoving is the answer – pusher robot

Offline

#281 2010-01-26 04:16:01

Something Clever
New Member
Registered: 2009-03-26
Posts: 8

Re: hak_article_image

Posting my mortification in case it helps someone else. I called in someone who COULD debug for me.. and they pointed out that one of my projects only had 1 item in it so far, so with the offset it was turning up empty, and borking the whole thing. The /portfolio/ page has multiple carousels on it, and hitting one that was now ‘empty’ caused the problem. Thanks so much for your assistance!

Offline

#282 2010-01-26 13:46:39

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: hak_article_image

That makes sense since jcaroussel doesn’t verify if the li array actually has anything in it before accessing the first item (which is kind of shoddy).

Glad you worked it out.


Shoving is the answer – pusher robot

Offline

#283 2010-02-21 14:23:26

catnip
Member
From: Sydney Australia
Registered: 2006-07-29
Posts: 58
Website

Re: hak_article_image

Hi Patrick and everybody,

A while back I posted the query below (see original post).
Just writing in to share a simple solution I found for it here

catnip wrote:

Hi Patrick,
I’m using the plugin in an article form to link to images, but want these links to be tracked by Google Analytics, which by default only tracks actual pages.

Google indicates here that tracking for linked files can be achieved by manual addition of the following code structure to each file:
<a href="http://www.example.com/files/map.pdf" onClick="javascript: pageTracker._trackPageview('/downloads/map'); ">

Is there any trickery that will allow me to include the javascript in the form? (I’m not a programmer – Just know how to cut and paste)

This is the form I’m using:

<li><br/>
<div id="title"><txp:title /></div>
<txp:excerpt />
<txp:hak_article_thumb link="1" linktype="image" linktitle='txp:caption' />
</li>

Thanks.

Offline

#284 2010-03-25 04:27:32

damienbuckley
Member
From: Brisbane, QLD, AU
Registered: 2006-02-24
Posts: 138
Website

Re: hak_article_image

First of all – thanks for a great plugin – its been a mainstay of our sites for a couple years now : )

I just have a query – is there any reason the plugin adds a title attribute to the img tag?

I get this for example;

<a href="…/images/12.jpg" title="Director / CEO" class="thickbox right"> <img src="http://binnacle.dev/images/12t.jpg" alt="alt text" title="Director / CEO" width="200" height="225" /> <span></span> </a>

Whereas there’s options to use title= on the link, I can’t see any mention of title= being included on the img tag and its surplus to requirements. Can I remove it?

Incase anyones wondering, I’m using the span’s so I can attach a magnifying glass icon over the top of the image.

Offline

#285 2010-03-25 15:35:40

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: hak_article_image

That is an artifact of the plugin using the built in image() function which assigns the caption to the title attribute if it exists.

I have a replacement function that I’m using for a more general purpose image plugin I’ve been building on and off, I could see how involved it would be to port that over.

Last edited by hakjoon (2010-03-26 02:20:21)


Shoving is the answer – pusher robot

Offline

#286 2010-09-13 23:37:28

hicks
Member
From: Portland, OR, USA (ex-UK)
Registered: 2009-05-08
Posts: 106
Website

Re: hak_article_image

Is there a way of returning the URL for the thumbnail of the first listed image rather than the thumbnail itself, similar to how <txp:upm_article_image><txp:upm_img_thumb_url /></txp:upm_article_image> does? I was running UPM’s code to spec those thumbnails as the backgrounds of divs, but with the multiple images I now want to run with this great HAK plugin, the UPM one doesn’t work.
Thanks!

Offline

#287 2010-09-14 00:37:09

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: hak_article_image

My dev environment is all jacked up so I can’t actually add this to the plugin atm, but you can just add this function to the plugin and then just use it in a form with <txp:hak_thumbnail_url />


Shoving is the answer – pusher robot

Offline

#288 2010-09-14 04:29:07

davebias
Member
From: New York, NY
Registered: 2006-04-11
Posts: 16
Website

Re: hak_article_image

Hi Patrick,

I’m using hak_article_image with Fancybox (http://fancybox.net/home) instead of slimbox, lightbox, et al.

Fancybox uses styles to define the type of modal window – iframe, image, swf, etc. – and uses rel=“x” to group items into a slideshow.

Well, since I’m going to have multiple articles with slideshows on any given page, I need to write a unique string to the rel=”…” element within each article

Here’s what I’m using now:
<txp:hak_article_thumb limit=“1” link=“1” linktype=“image” linkclass=“sshow” rel=”<txp:article_id />” linktitle=“txp:caption” />
(this is live but not really public at http://www.impossibleproject.info – third post down)

As you probably know, using the <txp:article_id /> tag inside of rel=”“ does not work. The article_id does not “render”…

I’m stumped about how to fix this… Help?

Thanks for a fantastic plugin, by the way. I’m using it already (with Slimbox) here: http://www.certo6.com

Last edited by davebias (2010-09-14 04:49:09)

Offline

Board footer

Powered by FluxBB