Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#109 2007-03-21 15:53:16

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

Re: hak_article_image

That’s great, thanks Patrick.

I used the following code…

<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 -->

…and the form you gave me. Seems so simple now!

Offline

#110 2007-03-24 20:34:50

two7s_clash
Member
From: VA
Registered: 2007-02-13
Posts: 15

Re: hak_article_image

My virtue of this following post my idiocy is well documented. No need for reminders. That said, how in the blazes do you actually associate explicitly more than one image with an article? I can only associate one image to an article.

Basically, I have several layouts based around the “sandbag” div approach:
<code>
<style>
#sml-02,#sml-03,#sml-04,
#sml-05,#sml-06,#sml-07,#sml-08,
#sml-09,#sml-10,#sml-11,#sml-12 {
float:left;
clear:left;
}

#smr-00,#smr-01,#smr-02,#smr-03,
#smr-04,#smr-05,#smr-06,#smr-07,
#smr-08,#smr-09,#smr-10,#smr-11,
#smr-12 {
float:right;
clear:right;
}
</style>
<h2><txp:title /></h2>
<div id=“smr-00”><txp:article_image/></div>
<div id=“sml-02”<txp:next_article_image /></div>
<div id=“smr-01”><txp:next_article_image /></div>
<div id=“sml-03”><txp:next_article_image /></div>
<div id=“smr-02”><txp:next_article_image /></div>
<div id=“sml-04”><txp:next_article_image /></div>
<txp:body />
</code>

I know that <txp:next_article_image> ain’t a real tag. But can you tell what I’m trying to do? Make it so the article body be what it may, will flow between right and left alternating images, using as few or as any images as I assign to a specific article. I thought I could do this with categoties, but no luck.

Clear as mud?

Help.

Last edited by two7s_clash (2007-03-24 20:37:19)


Existing is plagiarism.

Offline

#111 2007-03-24 22:04:15

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

Re: hak_article_image

Just use multiple image ids in the article-image field separated by commas.

For example: 5,16,25,2,11 will give you acces to those images in that order. You can then combine the limit and offset attributes to access a specific image. For example to display the thumbnail of image 25 you would do.

<txp:hak_article_thumb limit="1" offset="2" />

to display images 16,25 and 2 you can use

<txp:hak_article_image limit="3" offset="1" />

does that help?


Shoving is the answer – pusher robot

Offline

#112 2007-03-26 04:22:17

two7s_clash
Member
From: VA
Registered: 2007-02-13
Posts: 15

Re: hak_article_image

Ahh, yes, very helpful! Thx.


Existing is plagiarism.

Offline

#113 2007-03-29 16:55:16

two7s_clash
Member
From: VA
Registered: 2007-02-13
Posts: 15

Re: hak_article_image

Any general trouble shooting advice?

As I’m trying to insert hak_article_image tags my article forms, I keep getting thrown “500’s”

In the article image field, I’ve simply got: 9,35,30

Article form looks like this
<code> <div class=“m_text”>
<img alt=”“ style=“border: none” src=“http://test.strategicglobalsolutions.com/images/6-t1.gif” ><br>
<div class=“lh” style=“margin:20px 0px 0 62px” >
<h2><txp:title /></h2> <div id=“smr-00”><txp:hak_article_image limit=“1” /></div> <div id=“sml-02”><txp:hak_article_image offset=“1” limit=“1” /></div> <div id=“smr-01”><txp:hak_article_image offset=“2” limit=“1” /></div>

</div><txp:body />
</div>
</code>


Existing is plagiarism.

Offline

#114 2007-03-29 17:38:31

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

Re: hak_article_image

does it only happen when you insert the tag? Try just one instance of the tag to start. I can’t imagine what would be causing it to 500.

Do you have access to the error logs?

Last edited by hakjoon (2007-03-29 17:38:48)


Shoving is the answer – pusher robot

Offline

#115 2007-03-30 03:01:11

two7s_clash
Member
From: VA
Registered: 2007-02-13
Posts: 15

Re: hak_article_image

Yeah, I tried with just the one tag, that still kills it. I don’t see anything really in error.log… anywhere else I should look?

Here’s each piece as I’ve got it filled out currently:
http://f1shw1ck.com/sandbox/form.png
http://f1shw1ck.com/sandbox/page.png
http://f1shw1ck.com/sandbox/article.png
http://f1shw1ck.com/sandbox/section.png

Last edited by two7s_clash (2007-03-30 03:55:09)


Existing is plagiarism.

Offline

#116 2007-03-30 13:41:16

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

Re: hak_article_image

Nothing seems out of the ordinary.

What if you use the built in article_image tag? Does it work? If you are getting a 500 you should be seeing something in the Apache error log.


Shoving is the answer – pusher robot

Offline

#117 2007-03-30 14:56:41

two7s_clash
Member
From: VA
Registered: 2007-02-13
Posts: 15

Re: hak_article_image

Yeah, plain ol article image works…
Error log: [Fri Mar 30 07:54:37 2007] [error] [client 216.12.19.217] Premature end of script headers: php5.cgi, referer: http://test.strategicglobalsolutions.com/
[Fri Mar 30 07:54:39 2007] [error] [client 216.12.19.217] Premature end of script headers: php5.cgi, referer: http://test.strategicglobalsolutions.com/


Existing is plagiarism.

Offline

#118 2007-03-30 17:14:56

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

Re: hak_article_image

Alright I have no idea. What if you only have one image in the article_image field? Does it change the behaviour at all? If you switch the production State to debugging does it give you any info?

Also maybe you could try this previous Version that way I can at least track it to something in the new implementation.


Shoving is the answer – pusher robot

Offline

#119 2007-03-31 00:05:32

ekfritz
New Member
Registered: 2006-01-29
Posts: 4

Re: hak_article_image

Quick question, and I fully acknowledge this may be some gigantic brain-fart on my part but, in the description of hak_article_image, you say “both tags support the standard break, wraptag, class and breakclass attributes.”

So I tried to do this to use your plugin with Thickbox:

<txp:hak_article_thumb link="1" linktype="image" linktitle="txp:caption" class="Thickbox" />

yet when I look at the page source, no class attribute was applied. Am I missing something obvious?

Offline

#120 2007-03-31 16:03:56

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

Re: hak_article_image

No that’s actually just confusion on the way wraptags work. The class actually gets applied to the wrapping tag. It’s just a TXP idiosyncracy. I’ve thought of changing it but then it would be inconsistent with the way other tags work.

I didn’t realize Thickbox required a class on the link instaed of using rel="" Let me see about implementing that.

Last edited by hakjoon (2007-03-31 16:04:18)


Shoving is the answer – pusher robot

Offline

Board footer

Powered by FluxBB