Hi,
I wanted to get some opinion here on structure for short urls before clutteting up the NOC.
I've been using short-urls for several months and thought it would be better if the $in and $out arrays were in the one multi-dimensional array.
This would allow the entries to be grouped in pairs and would ease configuration of this file. Currently I used a split-pane editor. When editing existing entries or adding new ones there is a need to have the $in and $out arrays visible together with the .htaccess file. It is easy to get these arrays out of sync as it is currently setup.
What is the reasoning for the current structure?
It would be useful as well if this plugin could be overriden by placing it in the plugin directory for the theme. That would simplify configuration setps when PN version is updated.
Opinions anyone?
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 07:01 AM
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 06:41 AM
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 06:27 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Suggestion for structure of outputfilter.shorturls.php
-
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
The structure is simply based on the way Craig Saunders (coldrolledsteel) did his original short urls implementation. Any restructuing to make it easier would be welcome.
Theme specific plugins can be already exist by placing the file in themes/<themename>/plugins. However i've not checked if this path is searched before the main one. It would be a fairly simple check to confirm this. I'm not sure what would be best here though.... Having the theme path checked first would be best for overriding plugins but this would mean that each plugin check for a standard plugin would require an additional file system check first.
-Mark
--
Visit My homepage and Zikula themes.</themename> -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 152
I had a closer look at the code. It looks like it was structured in that way so that preg_replace function could be readily used. May need to look a little harder for a nice
solution.
Is there any change in the pipeline for short urls with regard to 0.8? I wouldn't want to spend time looking into it if there are plans for other changes to be made. -
**unknown user**
- Rank: Freshman
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 97
Mark,
Would it solve the problem to add a Xanthia configuration variable to indicate whether or not to check the theme path for overridden standard plugins? You're already grabbing all the Xanthia configuration variables anyway, so just adding another one wouldn't add to the overhead and then the theme plugin directory would only be checked for standard plugins if the user states that it should be. Come to think of it, this could either be a user option or something that's defined in the theme itself. Or maybe both. Let the theme determine the default setting and allow the user to override that setting.
Ed -
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
Ed,
Not necesarily. Every function call is an overhead and we need to ensure that we minimize those and all other permance related issues. I'll check the re-ordering of theme plugins to see the result. My aim is that a cache hit will be a quick as possible.
-Mark
--
Visit My homepage and Zikula themes.
- Moderated by:
- Support
