cotonti.com : add "item available" to list.php https://www.cotonti.com Laatste forum onderwerpen Cotonti en Sat, 17 Jan 2026 22:44:56 -0000 Kilandor <!-- IF {PHP.usr.id}={PHP.pag.page_ownerid} OR {PAGE_AVAILABLE}="1" OR {PHP.usr.isadmin}="1" --> That should work]]> Vr, 01 Jan 2010 18:56:49 -0000 ez thnx for the response :)
How can i do this: "The IAMTHEOWNER could be done via tpl."

For the other items, i cannot use xtra fields (in this case)
Still this part:
# if ($pag['page_begin']>$sys['now_offset'])
# {
#     $pag['page_text'] = $L['pag_notavailable'].sed_build_timegap($sys['now_offset'], $pag['page_begin_noformat']);
#     $t->assign("PAGE_TEXT", $pag['page_text']);
#     }
# else
# {

Is in page,inc.php, but not in list.inc.php ??
So maybe this should be there ???? (why in page and not in list)]]>
Thu, 31 Dec 2009 18:02:19 -0000
Kilandor
The IAMTHEOWNER could be done via tpl.
The page avail you should be able to do via Custom fields and TPL
Same for the Image thing, can be done with extra fields]]>
Thu, 31 Dec 2009 17:48:59 -0000
ez My demo site (still not live) is at http://schaaksite.2basix.nl/

I use this as follows:
<!-- BEGIN: LIST_ROW -->
	<!-- IF {LIST_ROW_IAMTHEOWNER}="1" OR {PAGE_AVAILABLE}="1" OR {PHP.usr.isadmin}="1" -->
	<tr>
		<td>
			<h4><a href=https://www.cotonti.com/"{LIST_ROW_URL}">{LIST_ROW_TITLE}</a></h4>
			<p class="small">{LIST_ROW_DESC}</p><br />
			<!-- IF {IMGR1_SRC} -->
				<a href=https://www.cotonti.com/"{LIST_ROW_URL}"><img width="{IMGR1_WIDTH}" height="{IMGR1_HEIGHT}" alt="Kunst" title="{LIST_ROW_TITLE}" src=https://www.cotonti.com/"{IMGR1_SRC}"/></a>
			<!-- ENDIF -->
		</td>
	</tr>
	<!-- ENDIF -->
<!-- END: LIST_ROW -->



there are a few tags in here that are mine:
{IMGR1_xxx} is a custom plugin I build for resizing imgs to different sizes in different places.
{PAGE_AVAILABLE} Code is in first post:
{LIST_ROW_IAMTHEOWNER} also a new tag i build:
     
"LIST_ROW_IAMTHEOWNER" => $usr['id']==$pag['page_ownerid'] ? '1' : '0',	

Anyway i think this could be usefull for the next version (maybe)???]]>
Thu, 31 Dec 2009 17:02:59 -0000
rayblo Thu, 31 Dec 2009 04:48:54 -0000 ez list.inc.php i do not see the following code.. (see page.inc.php for the same code)
It would be nice to add it there. That way I can detect if a page should be on the list or not. Also I want to show the "NON" published items to admins and owners only.
Also I made 1 tag in page called "PAGE_AVAILABLE" that i can use in xtemplate to make my skin programming simpler.. (and would like that in list too)
The PAGE_AVAILABLE tag i also added to page.inc.php.

Tell me what you all think....

In list.inc.php (2 tiny corehacks):
//============================
// LLS start modification	
//============================
if ($pag['page_begin']>$sys['now_offset'])
{
	$pag['page_text'] = $L['pag_notavailable'].sed_build_timegap($sys['now_offset'], $pag['page_begin_noformat']);
	$t->assign("PAGE_TEXT", $pag['page_text']);
// LLS modification	
	$t->assign("PAGE_AVAILABLE", "0");
	}
else
{
	$t->assign("PAGE_AVAILABLE", "1");

//============================
// LLS END modification
//============================

]]>
Thu, 31 Dec 2009 04:46:18 -0000