Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#85 2008-08-11 19:43:50

smallt
Member
Registered: 2004-12-21
Posts: 26

Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better

Sorry Jeff_K for the large dump here as I am not sure precisely what debugging code you need to see … but here is said information for an item at the end of a list:

<!-- Runtime:    0.0942 -->
<!-- Query time: 0.030008 -->
<!-- Queries: 47 -->
<!-- Memory: 3432Kb, <txp:if_last_article>
	<a class="more" href="/portfolio/?c=Papers">Browse MAYA Papers</a>
	<br />
	</div> <!-- end .related -->
</txp:if_last_article> -->
<!-- txp tag trace: 
[SQL (0.000203): select name, data from txp_lang where lang='en-us' AND ( event='public' OR event='common')]
[SQL (0.000782): select name, code, version from txp_plugin where status = 1]
[SQL (0.000212): select ID,Section from textpattern where url_title like 'us-postal-service' AND Section='portfolio' and Status >= 4 limit 1]
[SQL (0.000084): select * from txp_section where name = 'portfolio' limit 1]
[SQL (0.000131): select *, unix_timestamp(Posted) as uPosted from textpattern where ID=108 and Status in (4,5)]
[article 108]
[SQL (0.002689): select ID, Title, url_title, unix_timestamp(Posted) as uposted
			from textpattern where Posted > '2007-09-07 11:22:31' and Section = 'portfolio' and Status=4 and Posted < now() order by Posted asc limit 1]
[SQL (0.002016): select ID, Title, url_title, unix_timestamp(Posted) as uposted
			from textpattern where Posted < '2007-09-07 11:22:31' and Section = 'portfolio' and Status=4 and Posted < now() order by Posted desc limit 1]
[SQL (0.000657): select host from txp_log where ip='10.20.32.98' limit 1]
[SQL (0.000405): insert into txp_log set `time`=now(),page='/portfolio/us-postal-service',ip='10.20.32.98',host='10.20.32.98',refer='',status='200',method='GET']
[SQL (0.000098): select user_html from txp_page where name='--PORTFOLIO']
[Page: --PORTFOLIO]
<txp:output_form form="--HEAD" />
	[SQL (0.000084): select Form from txp_form where name='--HEAD']
	[Form: --HEAD]
	<txp:if_individual_article>
		[<txp:if_individual_article>: true]
		<txp:title/>
	</txp:if_individual_article>
	<txp:if_section name="portfolio">
		[<txp:if_section name="portfolio">: true]
	</txp:if_section>
	<txp:if_section name=",home">
		[<txp:if_section name=",home">: false]
	</txp:if_section>
	<txp:if_section name="practices">
		[<txp:if_section name="practices">: false]
	</txp:if_section>
	<txp:section/>
	<txp:site_url/>
	<txp:if_section name="principles">
		[<txp:if_section name="principles">: false]
	</txp:if_section>
	<txp:section title="1" link="1" name="principles" />
		[SQL (0.000071): select title from txp_section where name='principles']
	<txp:if_section name="practices">
		[<txp:if_section name="practices">: false]
	</txp:if_section>
	<txp:section title="1" link="1" name="practices" />
		[SQL (0.000065): select title from txp_section where name='practices']
	<txp:if_section name="portfolio">
		[<txp:if_section name="portfolio">: true]
	</txp:if_section>
	<txp:section title="1" link="1" name="portfolio" />
		[SQL (0.000065): select title from txp_section where name='portfolio']
	<txp:if_section name="about">
		[<txp:if_section name="about">: false]
	</txp:if_section>
	<txp:section title="1" link="1" name="about" />
		[SQL (0.000064): select title from txp_section where name='about']
	<txp:if_section name="contact">
		[<txp:if_section name="contact">: false]
	</txp:if_section>
	<txp:section title="1" link="1" name="contact" />
		[SQL (0.000067): select title from txp_section where name='contact']
<txp:output_form form="--INNER-HEAD" />
	[SQL (0.000064): select Form from txp_form where name='--INNER-HEAD']
	[Form: --INNER-HEAD]
	<txp:output_form form="--CRUMBS" />
		[SQL (0.000061): select Form from txp_form where name='--CRUMBS']
		[Form: --CRUMBS]
		<txp:etz_crumbs separator=" " home="1" />
			tag_error <txp:etz_crumbs separator=" " home="1" /> -> Notice: Undefined index:  query  on line 4
			tag_error <txp:etz_crumbs separator=" " home="1" /> -> Notice: Undefined index:  query  on line 4
			tag_error <txp:etz_crumbs separator=" " home="1" /> -> Notice: Undefined index:  query  on line 4
			tag_error <txp:etz_crumbs separator=" " home="1" /> -> Notice: Undefined index:  query  on line 4
			tag_error <txp:etz_crumbs separator=" " home="1" /> -> Notice: Undefined index:  query  on line 4
	<txp:if_individual_article>
		[<txp:if_individual_article>: true]
		<txp:title/>
	</txp:if_individual_article>
	<txp:output_form form="--SUB-MENU" />
		[SQL (0.000075): select Form from txp_form where name='--SUB-MENU']
		[Form: --SUB-MENU]
		<txp:if_individual_article>
			[<txp:if_individual_article>: true]
			<txp:if_section name="practices">
				[<txp:if_section name="practices">: false]
			</txp:if_section>
			<txp:if_section name="portfolio">
				[<txp:if_section name="portfolio">: true]
				<txp:maya_set name="var-section" value="Case Study" />
			</txp:if_section>
			<txp:if_article_category name="Business">
				[<txp:if_article_category name="Business">: false]
			</txp:if_article_category>
			<txp:if_article_category name="Executives,NonExecutives">
				[<txp:if_article_category name="Executives,NonExecutives">: false]
			</txp:if_article_category>
			<txp:if_section name="practices">
				[<txp:if_section name="practices">: false]
				<txp:jk_link_to_prev cat="current" />
					[SQL (0.001145): select ID, Title, url_title, unix_timestamp(Posted) as uposted
			from textpattern where title > 'U.S. Postal Service | User Experience Design' and Section = 'portfolio'  and category1 = 'Case-Study' and Status=4 and Posted < now() order by title asc limit 1]
					[SQL (0.001025): select ID, Title, url_title, unix_timestamp(Posted) as uposted
			from textpattern where title < 'U.S. Postal Service | User Experience Design' and Section = 'portfolio'  and category1 = 'Case-Study' and Status=4 and Posted < now() order by title desc limit 1]
					[SQL (0.000079): select ID as thisid, Section as section, Title as title, url_title, unix_timestamp(Posted) as posted from textpattern where ID = 110]
				<txp:maya_get name="var-section" />
				<txp:jk_link_to_next cat="current" />
					[SQL (0.000966): select ID, Title, url_title, unix_timestamp(Posted) as uposted
			from textpattern where title > 'U.S. Postal Service | User Experience Design' and Section = 'portfolio'  and category1 = 'Case-Study' and Status=4 and Posted < now() order by title asc limit 1]
					[SQL (0.001000): select ID, Title, url_title, unix_timestamp(Posted) as uposted
			from textpattern where title < 'U.S. Postal Service | User Experience Design' and Section = 'portfolio'  and category1 = 'Case-Study' and Status=4 and Posted < now() order by title desc limit 1]
				<txp:maya_get name="var-section" />
			</txp:if_section>
		</txp:if_individual_article>
<txp:if_individual_article>
	[<txp:if_individual_article>: true]
</txp:if_individual_article>
<txp:if_individual_article>
	[<txp:if_individual_article>: true]
</txp:if_individual_article>
<txp:if_individual_article>
	[<txp:if_individual_article>: true]
	<txp:if_article_category name="Case-Study">
		[<txp:if_article_category name="Case-Study">: true]
		<txp:article_image thumbnail="0" class="pad" />
			[SQL (0.000099): select * from txp_image where id = 65]
		<txp:asy_wtag>
			<txp:custom_field name="ImageCategory" />
			<txp:smd_gallery sort="name" text="Click to start lightbox" category="usps" id="?article_image" sublevel="all" form="--GALLERY" />
				[SQL (0.000081): select Form from txp_form where name='--GALLERY']
				[Form: --GALLERY]
				[SQL (0.000072): select lft as l, rgt as r from txp_category where name='usps' and type = 'image']
				[SQL (0.000077): select id, name, lft, rgt, parent, title from txp_category where lft between 37 and 38 and type = 'image' and name != 'root' and 1=1 order by lft asc]
				[SQL (0.000095): select txp_image.name,txp_image.id,txp_image.alt,txp_image.caption,txp_image.category,txp_image.author,txp_image.date,txp_image.ext,txp_image.w,txp_image.h,txp_image.thumbnail, txp_category.title AS category_title from txp_image, txp_category where txp_category.name = txp_image.category AND txp_category.type="image" AND 1=1 AND  (txp_image.id IN ('65') OR txp_image.category IN ('usps'))  ORDER BY txp_image.name asc LIMIT 0,99999]
		</txp:asy_wtag>
		<txp:article pgonly="0" form="--BODY ONLY" />
			[SQL (0.000076): select Form from txp_form where name='--BODY ONLY']
			[Form: --BODY ONLY]
			<txp:body/>
		<txp:asy_wtag>
			<txp:article_url_title/>
			<txp:article_custom limit="100" time="any" section="the-feed" category="press" keywords="us-postal-service" form="--BIO-PRESS" sort="Posted desc" />
				[SQL (0.000124): select *, unix_timestamp(Posted) as uPosted from textpattern where 1=1 and Status = 4 and (Category1 IN ('press') or Category2 IN ('press')) and Section IN ('the-feed') and (FIND_IN_SET('us-postal-service',Keywords)) order by Posted desc limit 0, 100]
		</txp:asy_wtag>
		<txp:asy_wtag>
			<txp:article_url_title/>
			<txp:article_custom limit="100" category="Papers,Articles,MAYApinion" keywords="us-postal-service" sort="Posted desc" form="--BIO-PAPERS" />
				[SQL (0.007134): select *, unix_timestamp(Posted) as uPosted from textpattern where 1=1 and Status = 4 and Posted <= now() and (Category1 IN ('Papers','Articles','MAYApinion') or Category2 IN ('Papers','Articles','MAYApinion')) and (FIND_IN_SET('us-postal-service',Keywords)) order by Posted desc limit 0, 100]
				[article 292]
				[SQL (0.000081): select Form from txp_form where name='--BIO-PAPERS']
				[Form: --BIO-PAPERS]
				<txp:if_first_article>
					[<txp:if_first_article>: true]
				</txp:if_first_article>
				<txp:output_form form="--PAPER-sm" />
					[SQL (0.000071): select Form from txp_form where name='--PAPER-sm']
					[Form: --PAPER-sm]
					<txp:title/>
					<txp:excerpt/>
						<txp:permlink id="45" title="Jon West">
							[SQL (0.000077): select ID as thisid, Section as section, Title as title, url_title, unix_timestamp(Posted) as posted from textpattern where ID = 45]
						</txp:permlink>
					<txp:permlink>
					</txp:permlink>
					<txp:if_custom_field name="File">
						[<txp:if_custom_field name="File">: false]
					</txp:if_custom_field>
				<txp:if_last_article>
					[<txp:if_last_article>: true]
				</txp:if_last_article>
		</txp:asy_wtag>
		<txp:asy_wtag>
			<txp:article_url_title/>
			<txp:article_custom limit="100" category="Patents" keywords="us-postal-service" sort="Posted desc" form="--BIO-PATENTS" />
				[SQL (0.006918): select *, unix_timestamp(Posted) as uPosted from textpattern where 1=1 and Status = 4 and Posted <= now() and (Category1 IN ('Patents') or Category2 IN ('Patents')) and (FIND_IN_SET('us-postal-service',Keywords)) order by Posted desc limit 0, 100]
		</txp:asy_wtag>
		<txp:asy_wtag>
			<txp:article_url_title/>
			<txp:article_custom limit="100" category="Speaking" time="any" keywords="us-postal-service" sort="Posted desc" form="--BIO-SPEAKING" />
				[SQL (0.000149): select *, unix_timestamp(Posted) as uPosted from textpattern where 1=1 and Status = 4 and (Category1 IN ('Speaking') or Category2 IN ('Speaking')) and (FIND_IN_SET('us-postal-service',Keywords)) order by Posted desc limit 0, 100]
		</txp:asy_wtag>
	</txp:if_article_category>
</txp:if_individual_article>
<txp:output_form form="--SIDEBAR-PRACTICES" />
	[SQL (0.000072): select Form from txp_form where name='--SIDEBAR-PRACTICES']
	[Form: --SIDEBAR-PRACTICES]
	<txp:article_custom category="Main" form="--LIST-ITEM" pgonly="0" sort="custom_4" section="practices" />
		[SQL (0.001036): select *, unix_timestamp(Posted) as uPosted from textpattern where 1=1 and Status = 4 and Posted <= now() and (Category1 IN ('Main') or Category2 IN ('Main')) and Section IN ('practices') order by custom_4 limit 0, 10]
		[article 401]
		[SQL (0.000074): select Form from txp_form where name='--LIST-ITEM']
		[Form: --LIST-ITEM]
		<txp:rvm_if_this_article>
			[<txp:rvm_if_this_article>: false]
			<txp:permlink>
				<txp:title/>
			</txp:permlink>
		</txp:rvm_if_this_article>
		[article 402]
		[Form: --LIST-ITEM]
		<txp:rvm_if_this_article>
			[<txp:rvm_if_this_article>: false]
			<txp:permlink>
				<txp:title/>
			</txp:permlink>
		</txp:rvm_if_this_article>
		[article 403]
		[Form: --LIST-ITEM]
		<txp:rvm_if_this_article>
			[<txp:rvm_if_this_article>: false]
			<txp:permlink>
				<txp:title/>
			</txp:permlink>
		</txp:rvm_if_this_article>
<txp:output_form form="--SIDEBAR-METHODS" />
	[SQL (0.000079): select Form from txp_form where name='--SIDEBAR-METHODS']
	[Form: --SIDEBAR-METHODS]
	<txp:article_custom category="Methods" form="--LIST-ITEM" pgonly="0" section="practices" />
		[SQL (0.001053): select *, unix_timestamp(Posted) as uPosted from textpattern where 1=1 and Status = 4 and Posted <= now() and (Category1 IN ('Methods') or Category2 IN ('Methods')) and Section IN ('practices') order by Posted desc limit 0, 10]
		[article 387]
		[Form: --LIST-ITEM]
		<txp:rvm_if_this_article>
			[<txp:rvm_if_this_article>: false]
			<txp:permlink>
				<txp:title/>
			</txp:permlink>
		</txp:rvm_if_this_article>
		[article 386]
		[Form: --LIST-ITEM]
		<txp:rvm_if_this_article>
			[<txp:rvm_if_this_article>: false]
			<txp:permlink>
				<txp:title/>
			</txp:permlink>
		</txp:rvm_if_this_article>
		[article 385]
		[Form: --LIST-ITEM]
		<txp:rvm_if_this_article>
			[<txp:rvm_if_this_article>: false]
			<txp:permlink>
				<txp:title/>
			</txp:permlink>
		</txp:rvm_if_this_article>
		[article 383]
		[Form: --LIST-ITEM]
		<txp:rvm_if_this_article>
			[<txp:rvm_if_this_article>: false]
			<txp:permlink>
				<txp:title/>
			</txp:permlink>
		</txp:rvm_if_this_article>
		[article 14]
		[Form: --LIST-ITEM]
		<txp:rvm_if_this_article>
			[<txp:rvm_if_this_article>: false]
			<txp:permlink>
				<txp:title/>
			</txp:permlink>
		</txp:rvm_if_this_article>
		[article 13]
		[Form: --LIST-ITEM]
		<txp:rvm_if_this_article>
			[<txp:rvm_if_this_article>: false]
			<txp:permlink>
				<txp:title/>
			</txp:permlink>
		</txp:rvm_if_this_article>
		[article 12]
		[Form: --LIST-ITEM]
		<txp:rvm_if_this_article>
			[<txp:rvm_if_this_article>: false]
			<txp:permlink>
				<txp:title/>
			</txp:permlink>
		</txp:rvm_if_this_article>
<txp:output_form form="--SIDEBAR-HELP" />
	[SQL (0.000089): select Form from txp_form where name='--SIDEBAR-HELP']
	[Form: --SIDEBAR-HELP]
	<txp:permlink id="42" title="Susan Salis">
		[SQL (0.000078): select ID as thisid, Section as section, Title as title, url_title, unix_timestamp(Posted) as posted from textpattern where ID = 42]
	</txp:permlink>
<txp:output_form form="--FOOT" />
	[SQL (0.000074): select Form from txp_form where name='--FOOT']
	[Form: --FOOT]
	<txp:section title="1" link="1" name="principles" />
	<txp:section title="1" link="1" name="practices" />
	<txp:section title="1" link="1" name="portfolio" />
	<txp:section title="1" link="1" name="about" />
	<txp:section title="1" link="1" name="contact" />
	<txp:output_form form="--FOOT-COPYRIGHT" />
		[SQL (0.000073): select Form from txp_form where name='--FOOT-COPYRIGHT']
		[Form: --FOOT-COPYRIGHT]
[ ~~~ secondpass ~~~ ]
 -->

Offline

#86 2008-08-11 20:50:54

smallt
Member
Registered: 2004-12-21
Posts: 26

Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better

alright, sorry but here is the relevant bit from the above code:

[SQL (0.000064): select Form from txp_form where name=’—INNER-HEAD’] [Form: —INNER-HEAD] <txp:output_form form=”—CRUMBS” /> [SQL (0.000061): select Form from txp_form where name=’—CRUMBS’] [Form: —CRUMBS] <txp:etz_crumbs separator=” “ home=“1” /> tag_error <txp:etz_crumbs separator=” “ home=“1” /> -> Notice: Undefined index: query on line 4 tag_error <txp:etz_crumbs separator=” “ home=“1” /> -> Notice: Undefined index: query on line 4 tag_error <txp:etz_crumbs separator=” “ home=“1” /> -> Notice: Undefined index: query on line 4 tag_error <txp:etz_crumbs separator=” “ home=“1” /> -> Notice: Undefined index: query on line 4 tag_error <txp:etz_crumbs separator=” “ home=“1” /> -> Notice: Undefined index: query on line 4 <txp:if_individual_article> [<txp:if_individual_article>: true] <txp:title/> </txp:if_individual_article> <txp:output_form form=”—SUB-MENU” /> [SQL (0.000075): select Form from txp_form where name=’—SUB-MENU’] [Form: —SUB-MENU] <txp:if_individual_article> [<txp:if_individual_article>: true] <txp:if_section name=“practices”> [<txp:if_section name=“practices”>: false] </txp:if_section> <txp:if_section name=“portfolio”> [<txp:if_section name=“portfolio”>: true] <txp:maya_set name=“var-section” value=“Case Study” /> </txp:if_section> <txp:if_article_category name=“Business”> [<txp:if_article_category name=“Business”>: false] </txp:if_article_category> <txp:if_article_category name=“Executives,NonExecutives”> [<txp:if_article_category name=“Executives,NonExecutives”>: false] </txp:if_article_category> <txp:if_section name=“practices”> [<txp:if_section name=“practices”>: false] <txp:jk_link_to_prev cat=“current” /> [SQL (0.001145): select ID, Title, url_title, unix_timestamp(Posted) as uposted from textpattern where title > ‘U.S. Postal Service | User Experience Design’ and Section = ‘portfolio’ and category1 = ‘Case-Study’ and Status=4 and Posted < now() order by title asc limit 1] [SQL (0.001025): select ID, Title, url_title, unix_timestamp(Posted) as uposted from textpattern where title < ‘U.S. Postal Service | User Experience Design’ and Section = ‘portfolio’ and category1 = ‘Case-Study’ and Status=4 and Posted < now() order by title desc limit 1] [SQL (0.000079): select ID as thisid, Section as section, Title as title, url_title, unix_timestamp(Posted) as posted from textpattern where ID = 110] <txp:maya_get name=“var-section” /> <txp:jk_link_to_next cat=“current” /> [SQL (0.000966): select ID, Title, url_title, unix_timestamp(Posted) as uposted from textpattern where title > ‘U.S. Postal Service | User Experience Design’ and Section = ‘portfolio’ and category1 = ‘Case-Study’ and Status=4 and Posted < now() order by title asc limit 1] [SQL (0.001000): select ID, Title, url_title, unix_timestamp(Posted) as uposted from textpattern where title < ‘U.S. Postal Service | User Experience Design’ and Section = ‘portfolio’ and category1 = ‘Case-Study’ and Status=4 and Posted < now() order by title desc limit 1] <txp:maya_get name=“var-section” /> </txp:if_section> </txp:if_individual_article>

Offline

#87 2008-08-11 21:21:33

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better

smallt + Jeff_K: Hey, how about exchanging mail addresses and smallt editing the above :)


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

#88 2010-10-15 10:06:26

jens31
Plugin Author
From: munich / dtschermani
Registered: 2008-08-25
Posts: 183
Website

Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better

i like!!

Offline

#89 2012-01-23 09:46:27

Mark
New Member
Registered: 2009-11-03
Posts: 6
Website

Re: [plugin] [ORPHAN] jk_neighbour: just like link_to_next/prev, only a bit better

This plugin sounds great!
Has anyone gotten it to work with unlimited_categories?

Offline

Board footer

Powered by FluxBB