Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#145 2007-07-18 12:21:30

stuart_mcnee
Member
Registered: 2006-11-17
Posts: 12

Re: hak_article_image

Hi
hak_article_thumb

New to Textpattern and trialing first use !

Am I missing something or is it possible to ‘style’ the attribute ‘popup’ / popup window in addition to increasing window width and height ? Current from below uses full browser chrome with image anchored top left

Using ‘class’ (as below) within tag styles the thumbnail within the article

<p><txp:hak_article_thumb limit=“1” offset=“1” link=“1” class=“imageThumb” linktype=“image” popup=“1” wraptag=“p” /><txp:hak_article_thumb limit=“1” offset=“2” link=“1” class=“imageThumb” linktype=“image” popup=“1” wraptag=“p” /><txp:hak_article_thumb limit=“1” offset=“3” link=“1” class=“imageThumb” linktype=“image” popup=“1” wraptag=“p” /></p>

Help would be gratefully appreciated

many thanks

Stuart McNee

Offline

#146 2007-07-18 14:43:05

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

Re: hak_article_image

What browser are you seeing this in? You should not be getting any toolbars only scrollbars if needed.

If you want more control over what the contents of the popup looks like you should can use *_linktype=_*_“section”_ to point it to a specific section which will display the image using either <txp:image_display /> or <txp:hak_article_image urloverride="1" />


Shoving is the answer – pusher robot

Offline

#147 2007-07-19 08:23:52

stuart_mcnee
Member
Registered: 2006-11-17
Posts: 12

Re: hak_article_image

Hi
Safari 3.0.2 Firefox 2.0.0.4 OSX 10.4.10

I incorrectly stated uses “full browser chrome” – it is as you state title bar with scrollbars – apologies more diligence required !

Will try linktype as suggested to style image etc

Many thanks

Offline

#148 2007-10-03 21:22:27

enigma5568
New Member
Registered: 2007-09-30
Posts: 2

Re: hak_article_image

Hey Great Plugin!!

It has been a huge help!

I do have a slight problem though. First a little background…

I am including the form “featured project” witht the following reference:

<txp:article_custom form="featured_project" id="6" limit="1" pgonly="0" section="portfolio" status="4" />

The “featured_project” form has the following:

<txp:hak_article_image class="featured_project" link="0" offset="1" />

Now here is my problem:

The class specified in the form is not applied to my img tag. If i use the default image tag it adds the class, but does not understand multiple images so it puts the src as “44,43”.

Is there a way to apply a class directly to the image without adding a break tag, I don’t want to add unnecessary tags simply for visual purposes.

Thanks in Advance!!

Michael

Offline

#149 2007-10-04 00:48:06

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

Re: hak_article_image

Using a form allows you to pass a class to the image. This should work:

<txp:hak_article_image form="article_image_form" offset="1" />

In article_image_form use

<txp:hak_image class="featured_project" />


Shoving is the answer – pusher robot

Offline

#150 2007-11-06 13:33:19

FRIIIEEK
Member
From: Düsseldorf
Registered: 2007-03-23
Posts: 17

Re: hak_article_image

Hi hakjoon!

I’m still using your hak_article_image-Plugin with great pleasure! ;) Thanks therefore… ;)

My question this time is (i hope) quite simple, so let me explain:

I have a little Image-Preloader and Switcher(with mouseover).
All i need is to get the id of the second image I added in the “Article-Image-Field” of the article.

Something like <txp:hak_article_image_id offset="1" />, additional maybe with limit=“2” or something?!

It would be great if you could help me one more time! ;)

Thanks
FRIIIEEK

Offline

#151 2007-11-06 21:33:23

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

Re: hak_article_image

There currently isn’t a tag to do this but if you use a form you could,

<txp:hak_article_image offset="1" form="myform" />

then in myform try

<txp:php>
echo $GLOBALS['hak_thisimage']['id'];
</txp:php>

I haven’t actually tried this and I don’t use <txp:php> much so i don’t know the ins and outs of using it, but I think it should work.


Shoving is the answer – pusher robot

Offline

#152 2007-11-16 18:11:50

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

Re: hak_article_image

Hi Patrick,

I was wondering if you could help me, I’m trying to produce a layout with hak_article_image that uses numbered links instead of thumbnails. I would then style the links with CSS.

This is the code for a main image + thumbnail links that you helped me with before:

<div class="columns-2-A">
<txp:hak_article_image limit="1" urloverride="1" form="decoder_hak_caption" break="br" wraptag="ul" />
<txp:hak_article_thumb link='1' linktype="page" urlhide='0' />
</div><!-- end of columns-2-A -->

Many thanks.

Offline

#153 2007-11-16 22:27:35

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

Re: hak_article_image

You can use <txp:hak_article_image_link /> in a form to just create a link. So for example to replace the thumbnail in the example above with just an ordered list of the alt values you could do

<div class="columns-2-A">
<txp:hak_article_image limit="1" urloverride="1" form="decoder_hak_caption" break="br" wraptag="ul" />
<txp:hak_article_thumb form="ordered_links" wraptag="ol" break="li" />
</div><!-- end of columns-2-A -->

then in the ordered_links form you can do

<txp:hak_article_image_link type="page"><txp:hak_image_alt /></txp:hak_article_image_link>

which should give an ordered list of linked alt values which point to the same page passing teh image along. See if that works.


Shoving is the answer – pusher robot

Offline

#154 2007-11-19 11:06:26

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

Re: hak_article_image

Hi Patrick,

Many thanks for your help, I’ve tried out your sample code and it’s beginning to work well.

However, instead of the image ALT displaying I’d just like an ordered numbered list (with perhaps the ALT showing as a tooltip), so for example, if there’s 4 images they’ll be 4 numbered links. This an example of how it’s working at the moment, although not all entries have multiple images.

This is my css:
.pagelink { font-size: 10px; height: 2.5em; font: bold 10px/2.5em "Lucida Grande", "Verdana", sans-serif; padding: 0 14px 0 8px; float: left; }
.pagelink a { color: #fff; padding: 2px 3px; background: #8f0817; text-decoration: none; }
.pagelink a:visited { }
.pagelink a:hover { background: #9b0000; }
.pagelink a:active { color: #4d4d4d; background: #ffffff; }

I’m not sure where to go from here so would really appreciate a little further direction. Thanks.

Last edited by decoderltd (2007-11-19 15:58:50)

Offline

#155 2007-11-19 16:17:14

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

Re: hak_article_image

Sorry,I’m not quite understanding what you want. You can put whatever you want in between the <txp:hak_article_image_link type="page"> tags. Static text, other TXP tags whatever you want.

Are you looking for

  1. link
  2. link
  3. link

or

1
2
3

I’m not sure of an easy solution for the second one, because there isn’t a built in tag that will expose the loop count as far as I know, so we would have to add a tag to handle that.


Shoving is the answer – pusher robot

Offline

#156 2007-11-19 17:03:20

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

Re: hak_article_image

Hi Patrick,

Yep, it’s the second option that I’m trying to achieve! It makes everything that much neater (it can run over one line) and also lets the viewer know the number of images are available.

If there’s no way around it I could look at your first option and keep the description very short, I’d just need to create a numbered list.

Offline

Board footer

Powered by FluxBB