Is it possible?

Is it possible?

Postby chromos on Fri Aug 29, 2008 6:32 am

Is it possible to remove let's say the archive.template and redirect the user to main.template instead? Any ideas of how I coulld achieve this behavior? Maybe with an specific .htaccess? Or do I have to patch core code?

I also made the UserList and BlogList on the summary only visible when the user is authenticated ... don't know If I shall upload this small changes to bugs.lifetype.net though.

What I also wanted to know .... where in the code is the top menu in the administration panel made? It gets loaded from a xml file doesn't it? but where does it get into the template? Don't know if I am clear enough =)
chromos
 
Posts: 274
Joined: Wed Mar 09, 2005 2:22 pm
LifeType Version: 1.2.9-devel

Re: Is it possible?

Postby jondaley on Fri Aug 29, 2008 8:08 am

chromos wrote:Is it possible to remove let's say the archive.template and redirect the user to main.template instead? Any ideas of how I coulld achieve this behavior? Maybe with an specific .htaccess? Or do I have to patch core code?

I am not sure what you are trying to do, can you explain what you want to happen, ie. don't ever show the archives?

I also made the UserList and BlogList on the summary only visible when the user is authenticated ... don't know If I shall upload this small changes to bugs.lifetype.net though.

Might as well - I don't know if it will be integrated into the core, but someone else might want the code.

What I also wanted to know .... where in the code is the top menu in the administration panel made? It gets loaded from a xml file doesn't it? but where does it get into the template? Don't know if I am clear enough =)

The content is in templates/admin/menus.xml.
You might want to look at navigation.template?
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Re: Is it possible?

Postby chromos on Fri Aug 29, 2008 9:39 am

jondaley wrote:
chromos wrote:Is it possible to remove let's say the archive.template and redirect the user to main.template instead? Any ideas of how I coulld achieve this behavior? Maybe with an specific .htaccess? Or do I have to patch core code?

I am not sure what you are trying to do, can you explain what you want to happen, ie. don't ever show the archives?

yeah exactly. E.g. If you are using LT more like a kind of a CMS it can be useful when the archive.template is not shown but the user is getting redirected to the main.template.
jondaley wrote:
I also made the UserList and BlogList on the summary only visible when the user is authenticated ... don't know If I shall upload this small changes to bugs.lifetype.net though.

Might as well - I don't know if it will be integrated into the core, but someone else might want the code.

ok gonna upload the files ...
jondaley wrote:
What I also wanted to know .... where in the code is the top menu in the administration panel made? It gets loaded from a xml file doesn't it? but where does it get into the template? Don't know if I am clear enough =)

The content is in templates/admin/menus.xml.
You might want to look at navigation.template?

I somehow found it strange that the menu is generated from a xml file :) never saw something like that before ...
chromos
 
Posts: 274
Joined: Wed Mar 09, 2005 2:22 pm
LifeType Version: 1.2.9-devel

Re: Is it possible?

Postby jondaley on Sat Aug 30, 2008 6:42 am

I guess the first thing is to remove the links to the archives. If you are using custom URLs, you could purposely break the archive URLs to be invalid - ie. not contain a date or something like that. And lastly, what happens if you remove the contents of archive.template, or put a "include main.template" in it instead?

The xml file is kind of neat - we did a pretty major reorganization at one point, and only the xml file was touched - all the php form code, etc. stayed the same. I thought that was pretty good.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Re: Is it possible?

Postby chromos on Sat Aug 30, 2008 8:25 am

jondaley wrote:I guess the first thing is to remove the links to the archives. If you are using custom URLs, you could purposely break the archive URLs to be invalid - ie. not contain a date or something like that. And lastly, what happens if you remove the contents of archive.template, or put a "include main.template" in it instead?

good ideas! Gonna give them a try
jondaley wrote:The xml file is kind of neat - we did a pretty major reorganization at one point, and only the xml file was touched - all the php form code, etc. stayed the same. I thought that was pretty good.


I see, I am asking because I wanted to play around ajaxifying the admin panel and it's a bit unusal.
chromos
 
Posts: 274
Joined: Wed Mar 09, 2005 2:22 pm
LifeType Version: 1.2.9-devel

Re: Is it possible?

Postby jondaley on Mon Sep 01, 2008 9:11 am

You might want to take a look at LT 2.0, where a bunch of things have already been "ajaxified".
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Re: Is it possible?

Postby chromos on Wed Sep 17, 2008 3:44 pm

I didn't have a closer look at LT 2.0 because it seems there has already so much changed and I am atm digging deeper into LT 1.2.9 code ...

but to come back to my original question.

I tried your suggestion
And lastly, what happens if you remove the contents of archive.template, or put a "include main.template" in it instead?

on the summary templates to make UserList etc. not available for non-admin users.

Unfortunately I have some custom code I am calling in index.template which is not available when the UserList action is getting fired, so I am getting an error message with "include index.template"

Should I just add my custom code via SetView or does anyone know of a neater solution?

EDIT: My actual solution are two smarty If else statments checking authuser and isSiteAdmin and if the user is not a Site Admin I have a
Code: Select all
<head><meta HTTP-EQUIV="REFRESH" content="0; url=http://www.foo.com">
redirecting the user to the summary page back ...
chromos
 
Posts: 274
Joined: Wed Mar 09, 2005 2:22 pm
LifeType Version: 1.2.9-devel

Re: Is it possible?

Postby chromos on Thu Sep 18, 2008 11:30 am

another quick question. I don't see where summary.template is beeing used. Any hints?
op?=Summary leads back to the mainpage which is the index.template indeed isn't it?
chromos
 
Posts: 274
Joined: Wed Mar 09, 2005 2:22 pm
LifeType Version: 1.2.9-devel

Re: Is it possible?

Postby jondaley on Fri Sep 19, 2008 9:42 am

Hrm. maybe it isn't used. I guess you could simply edit it with a "hello world" message, and then click on the five tabs or whatever - I don't see in the code where it is referenced. It might be an old file.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Re: Is it possible?

Postby chromos on Tue Sep 23, 2008 10:43 am

yeah I removed it :)
chromos
 
Posts: 274
Joined: Wed Mar 09, 2005 2:22 pm
LifeType Version: 1.2.9-devel


Return to Templates

cron