Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#205 2008-07-28 15:04:08

jano
Member
Registered: 2008-01-09
Posts: 23

Re: glz_custom_fields

Thanks for the hint Zanza, I’ll check it out.

Offline

#206 2008-08-13 01:20:41

husainhk
Member
From: Dubai, UAE
Registered: 2007-08-12
Posts: 105
Website

Re: glz_custom_fields

Hi all,

I can’t seem to load articles based on a certain category, when I use this “/section/?c=categoryname” URL structure, in a page that has the <txp:glz_article /> tag. If I use the plain <txp:article /> tag, then it does load articles based on the category suppled in the URL.

Any idea, what could be the problem? Or is there a workaround for this? I am in need of urgent help!

Cheers,
Husain

Offline

#207 2008-08-13 16:13:12

coopersita
Member
Registered: 2005-09-28
Posts: 68
Website

Re: glz_custom_fields

Hi Husain,

I may be wrong, but from what I was reading, glz_article is for search results only. I thing you should have something like <txp:if_search> to use either glz_article or just txp:article depending on whether it’s a search results page, or a regular (category, section, individual article) page.

Hope this helps.

Offline

#208 2008-08-13 16:51:57

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: glz_custom_fields

gerhard still working on this? almost been a year since i bought this app thinking one of the features (‘trigger’ words) i had requested would make it in some time soon.

Offline

#209 2008-08-18 05:22:09

husainhk
Member
From: Dubai, UAE
Registered: 2007-08-12
Posts: 105
Website

Re: glz_custom_fields

coopersita,

I tried the <txp:if_search> setup, but doesn’t work :(. I am nesting it within the <txp:if_individual_article> tag, could that be the problem, although I don’t think so?

I can’t contact Geri, thought he’d be able to help. Anybody who knows, how this could be resolved?

Offline

#210 2008-08-21 02:31:07

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: glz_custom_fields

Hello All,

I have commented out some custom fields in txp_article.php so I can make them extra excerpts. (see here for more details)

Now I’m using glz_custom_fields and it is adding those fields back to the write tab – I guess it overrides txp_article.php.
I’m already using (sed_section_fields) to hide them again, but they “briefly” flash on the screen when changing sections – and while demoing TXP for the client they asked about it (of course).

Anyhow, I’d like to just mod glz_custom_fields so it will never display the original custom fields that I’m using as excerpts.
I had a look at the code and couldn’t figure out where to start.

Any ideas? I know I’m asking a lot. : )


Tom

Last edited by renobird (2008-08-21 02:32:12)

Offline

#211 2008-08-21 12:25:52

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: glz_custom_fields

Tom, is display: none an option? They all have their own IDs.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Online

#212 2008-08-21 13:51:49

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: glz_custom_fields

uli wrote:

Tom, is display: none an option? They all have their own IDs.

Thanks Uli,

Sometimes it’s the simplest solution that’s the most difficult to see.

)


Tom

Offline

#213 2008-08-22 17:11:29

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: glz_custom_fields

In need of some help.

I’ve converted all 10 of the original custom fields to additional excerpts.
The mod requires that the custom fields are changed from varchar255 to text in the textpattern table.

The problem is that now that they are text they span multiple lines, so when glz_custom_fields tries to go get the content it breaks and returns

error: unterminated string literal.

Anyhow, I’ll get to the point.
I’d like to mod the plugin so that it doesn’t try to pull anything from the 1st 10 custom fields.
I’ve looked at the code, and am way out of my depth.

Any assistance would be greatly appreciated.


Tom

Offline

#214 2008-08-24 22:36:27

azw
Member
Registered: 2007-01-29
Posts: 279

Re: glz_custom_fields

I’m having trouble with two things that are probably related.

First, I wanted to use the tag, glz_article_custom. In Gerhard’s explanation it says that the articles have to be in the same section. One of the purposes of the article_custom tag was to be able to list articles from any section. Is this an error, or is glz_article_custom different?

<txp:glz_article_custom limit=“5” no_results=“no_results” form=“some_form” />
This needs to be used instead of txp:article_custom where you want the search results to appear. We need to “inject” our extra custom fields in the search query and modify it slightly. This is a straight copy of article_custom() from TXP 4.0.6 (r2085) with some “magical dust” : ).

This is not too obvious so please pay attention. If our custom search tag is set to land on section “listings” (which we define in glz_custom_fields_search_form), the articles you want searching must be belong to this section. For example, if our search points to section “listings” but our articles are saved under section “properties”, there will be no matches and thus we will be forwarded to no_results page. In this case, what we might want to do, is set results_page in glz_custom_fields_search_form to “properties”.

no_results – if no matching results are found, this is the page (section) where the users will be redirected (no_results by default)

If that wasn’t a mistake, is there a way to modify the plugin so that glz_article_custom acts like the default article_custom?

Second, when I try to sort on an glz_article_custom (or just article_custom), I get an error saying

“Textpattern Warning: Unknown column”.
Tag error: <txp:glz_article_custom section=“documents” status=“live” sort=“year asc” form=“mapdata” limit=“999” /> -> Textpattern Warning: Unknown column ‘year’ in ‘order clause’
select *, unix_timestamp(Posted) as uPosted from textpattern where 1=1 and Status = 4 and Posted <= now() and Section IN (‘documents’) order by year asc limit 0, 999 on line 81

This occurs when I’m trying to sort the listing of “markers” in a Google Maps application.
I’m using this as my model:
http://davidramos.org/thesis/google-maps-in-textpattern

Here’s the article_custom code I’ve tried:

<markers>
<txp:article_custom section="documents" status="live" sort="year asc" form="mapdata" limit="999" />
</markers>

The glz_article_custom code is:

<markers>
<txp:glz_article_custom section="documents" status="live" sort="year asc" form="mapdata" limit="999" />
</markers>

Does anyone have any thoughts on what’s going wrong?

Offline

#215 2008-08-25 16:28:15

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: glz_custom_fields

azw

that second error is occuring because there is no field called ‘year’ in the textpattern table. Is ‘year’ the name of one of your custom fields? Does this work?…

<markers>
<txp:article_custom section="documents" status="live" sort="Posted asc" form="mapdata" limit="999" />
</markers>

Hope that helps!


Steve

Offline

#216 2008-08-27 08:06:14

husainhk
Member
From: Dubai, UAE
Registered: 2007-08-12
Posts: 105
Website

Re: glz_custom_fields

Hi all,

I have a section “models” and certain categories like “males”, “females”, “kids” etc. And depending on the category name supplied in the URL “/section/?c=categoryname”, my page loads showing the relevant articles.

I am using the plugin to filter results through a search form, output by the plugin. The results show correctly when I use the <txp:glz_article /> tag, according to the plugin help. But when I access the articles from the URL (without the search form), then the <txp:glz_article /> tag shows all the articles and not by category. If I use the <txp:article /> tag then the form obviously doesn’t work, but the category name in the URL shows the right articles.

Any idea what this is and how to solve this? Please help.

The page template looks like below with the <txp:article /> tag:

<txp:if_individual_article>

	<!-- Show Full Article -->
	<h1><txp:title /></h1>
	<div id="model-container" class="clearfix">
		<div id="default-picture"><txp:hak_article_image limit="1" link="0" /></div>
			<div id="details">
				<txp:body />
			</div>
		<ul id="article-nav">
			<li id="prev-article"><txp:jra_link_to_prev sort="title asc" showalways="0">Previous Model</txp:jra_link_to_prev></li>
			<li id="next-article"><txp:jra_link_to_next sort="title asc" showalways="0">Next Model</txp:jra_link_to_next></li>
		</ul>
	</div><!-- End model-container -->

	<h1>Photo Gallery</h1>
	<txp:article form="lightbox_gallery" />

	<txp:else />

		<!-- Show Landing Page -->
		<h1><txp:category title="1" /></h1>
		<ul class="thumbnails">
			<txp:article limit="999" form="model_thumbnails" time="any" sort="title asc" />
		</ul>

</txp:if_individual_article>

Offline

Board footer

Powered by FluxBB