Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#61 2005-03-31 07:45:43

micampe
Archived Plugin Author
From: Treviso, Italy
Registered: 2005-03-07
Posts: 38
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

> As for the permlink plugin, mic_permlink still seems to fall short of providing a section/category/title url scheme.

I just added sungobiff’s changes to the plugin, please give it a try and let me know.

Offline

#62 2005-03-31 12:56:25

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

micampe, there is a small problem with the plugin: when you choose section/category/title, there is no slash between category and title; I added it to the switch case statement but then there’s a double slash if an article has no category and therefor assumes section/title (which works with sgb_url_handler).

Offline

#63 2005-03-31 14:59:31

micampe
Archived Plugin Author
From: Treviso, Italy
Registered: 2005-03-07
Posts: 38
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

Should be fixed now.

(you can delete your own posts)

Offline

#64 2005-03-31 15:21:14

osei
Plugin Author
From: Stockholm, Sweden
Registered: 2004-07-01
Posts: 178
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

This is a really great plugin, and in combination with micampes plugin its exactly what i been waiting/hoping for.

a question, has anybody got conditionals (if article list, is individual article) to work with section/title? I know wilshire posted about this, and that he was using tcm_if, but i cant get it to work… anybody? or do you think this is something that could be handle by sql_url_handler?

I also get this errors on my local setup, with error reporting on
<code>
Notice: Undefined index: PATH_INFO in C:\www\current\textpattern\lib\txplib_misc.php(304) : eval()’d code on line 250
Notice: Undefined index: Section in C:\www\current\textpattern\lib\txplib_misc.php(304) : eval()’d code on line 325
Notice: Undefined variable: categories in C:\www\current\textpattern\lib\txplib_misc.php(304) : eval()’d code on line 490
Notice: Undefined variable: limit in C:\www\current\textpattern\lib\txplib_misc.php(304) : eval()’d code on line 505
</code>

Thanks again


Johan Nilsson

Offline

#65 2005-03-31 16:37:18

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

osei, I also had problems with the conditionals on my local setup. Strangely, they disappeared after I set the whole thing up on the real server.

Can’t say anything about these error messages though, sorry. Where do you turn error reporting on?

Offline

#66 2005-03-31 23:43:53

sungodbiff
Archived Plugin Author
Registered: 2004-03-23
Posts: 57
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

I’ve been fighting a flu the last few days, hopefully I’ll have some time to devote to getting some of these issues worked out. That’s it for my excuses :)

I have the conditionals working on my site (which is down at the moment). I’ll post my forms once everything is working again.

Andreas –

I’m still working to figure out where the problem could be coming from with your set-up. Once my site comes back up and I have a chance to test a couple things, I’ll probably give you a couple modifications to make to the plugin to get some debugging info.

Osei –

Your errors aren’t actually errors, they’re just “messages,” your error reporting is set to display everything. The first two are warnings that two indexes don’t exists in certain arrays. The last two are telling you that two variables don’t exist.

Check out http://www.php.net/error_reporting for more information on how PHP handles error reporting. Typically you want to turn off error_reporting on a production site, but leave it on for a development site.

If you’re using 1.0RC3 you can edit /index.php and add a line at the top (just after &#60;?php):
error_reporting(E_ALL ^ E_NOTICE);

To disable the notices.

- sgb

Offline

#67 2005-04-01 08:16:47

osei
Plugin Author
From: Stockholm, Sweden
Registered: 2004-07-01
Posts: 178
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

i will try again with my conditionals…

yes, its on my dev machine i have error reporting set to display all.


Johan Nilsson

Offline

#68 2005-04-01 09:46:48

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

sgb,

after I moved the install to the remote server all is now working. Honestly, I fumbled so much with all the permlink plugins (zem, mic, yours) that I can’t remember what exactly I did, if I did anything else than moving to the Linux machine.

Anyway, thanks for your help.

Offline

#69 2005-04-01 11:25:29

osei
Plugin Author
From: Stockholm, Sweden
Registered: 2004-07-01
Posts: 178
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

hmm thats strange, the conditionals seems to work on my linux machine to, can anyone explain why? :)


Johan Nilsson

Offline

#70 2005-04-01 17:37:23

sungodbiff
Archived Plugin Author
Registered: 2004-03-23
Posts: 57
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

Osei -

Hmm, I actually don’t have a ton of experience with TxP, I wrote the plugin the same day I got my site launched :)

I’ll fire up IIS on my desktop at home and get PHP setup and see what I can figure out.

You’re using the built-in conditionals right?

- sgb

Offline

#71 2005-04-01 21:14:30

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

About sgb_error_documents: I can’t seem to figure out how to configure it.

So this is the code of the first functions:

<code>
/*
** Configuration
*/

function sgb_error_documents_config() // array
{ // 404 File Not Found $sgb_config[‘error_documents’][‘404’][‘id’] = null; $sgb_config[‘error_documents’][‘404’][‘url’] = null; $sgb_config[‘error_documents’][‘404’][‘file’] = null; $sgb_config[‘error_documents’][‘404’][‘text’] = null;

// 403 Forbidden $sgb_config[‘error_documents’][‘403’][‘id’] = null; $sgb_config[‘error_documents’][‘403’][‘url’] = null; $sgb_config[‘error_documents’][‘403’][‘file’] = null; $sgb_config[‘error_documents’][‘403’][‘text’] = null;

return $sgb_config;
}
</code>

Where do I add my own values like ID of the error article etc.?

Also, why the four options and what happens if I don’t have a text file to use?

Thanks.

Offline

#72 2005-04-01 22:14:39

osei
Plugin Author
From: Stockholm, Sweden
Registered: 2004-07-01
Posts: 178
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

im running apache 2.0 under win xp with php5.

My conditionals look like this
<code>
<txp:glx_if_section_frontpage>
<txp:article id=“30” form=“static_page” />
</txp:glx_if_section_frontpage>
<txp:if_individual_article>
<txp:article form=“static_page” />
</txp:if_individual_article>
</code>

im using mine glx_if plugin for the first conditional. But there is no different if i use that one or <code><txp:if_article_list></code> the problem is with <code><txp:if_individual_article></code>


Johan Nilsson

Offline

Board footer

Powered by FluxBB