[TYPO3] CHC_Forum and RealUrl : nice URL's

Ralf Hettinger ng at ralfhettinger.de
Tue Feb 20 15:51:54 CET 2007


Hi Joost,

Joost van Berckel schrieb:
> Now the URL looks like this:
> 
> Single tread : 
> http://scholierenlab-test.tudelft.nl/nl/forum/vragen/single_thread/wiskunde/reynoldsgetal/1/
> 
> All categories : 
> http://scholierenlab-test.tudelft.nl/nl/forum/vragen/all_cats/
> 
> Single conference: 
> http://scholierenlab-test.tudelft.nl/nl/forum/vragen/single_conf/wiskunde//1/

That's not that bad already, is it? Some more ideas follow...


> However I want to have:
> 
> Single tread : 
> http://scholierenlab-test.tudelft.nl/nl/forum/topic/wiskunde/reynoldsgetal/
> 
> All categories : http://scholierenlab-test.tudelft.nl/nl/forum/topiclist/ or 
> http://scholierenlab-test.tudelft.nl/nl/forum/
> 
> Single conference: 
> http://scholierenlab-test.tudelft.nl/nl/forum/topic/wiskunde/

To get rid of 'vragen' switch to fixedPostVars. That should not be a problem,
since the chc normally resides on a certain page:

[...]
'fixedPostVars' => array(
  '[pid with forum plugin]' => $forumconfig,
),
[...]


Secondly, to have an individual fit of single_thread etc. use valueMap

At last, there are some things for viewing the profile etc. that should be
considered... following an example for $forumconfig (not everthing you mentioned
is probably possible without some more dramatic source code changes; e.g. single
conference and single thread need other view params - but maybe the following
can deliver a compromise)


$forumconfig = array (
        array ( 'GETvar' => 'view',
                'valueMap' => array (
                        'search' => 'search',
                        'main' => 'all_cats',
                        'topic' => 'single_conf',
                        'thread' => 'single_thread',
                        'profile' => 'profile',
                        'users' => 'ulist',
                        'category' => 'single_cat',
                        'pm' => 'cwt_user_pm',
                        'buddylist' => 'cwt_buddylist',
                        'reply' => 'single_post',
                ),
        ),
        array ( 'cond' => array (
                        'prevValueInList' => 'profile'
                ),
                'GETvar' => 'author'
        ),
        array ( 'cond' => array (
                        'prevValueInList' => 'single_post,quote'
                ),
                'GETvar' => 'post_uid',
        ),
        array (
                'GETvar' => 'page',
                'noMatch' => 'bypass',
        ),
        array ( 'GETvar' => 'cat_uid',
                'lookUpTable' => array (
                        'table' => 'tx_chcforum_category',
                        'id_field' => 'uid',
                        'alias_field' => 'cat_title',
                        'addWhereClause' => ' AND NOT deleted',
/* other stuff might follow here; e.g */
                        'useUniqueCache' => 1,
                        'useUniqueCache_conf' => array (
                                'strtolower' => 1,
                                'spaceCharacter' => '-'
                        ),
                        'autoUpdate' => 1,
                        'expireDays' => '14'
                ),
        ),
        array ( 'GETvar' => 'conf_uid',
                'lookUpTable' => array (
                        'table' => 'tx_chcforum_conference',
                        'id_field' => 'uid',
                        'alias_field' => 'conference_name',
                        'addWhereClause' => ' AND NOT deleted',
/* other stuff might follow here */
                ),
        ),
        array ( 'GETvar' => 'thread_uid',
                'lookUpTable' => array (
                        'table' => 'tx_chcforum_thread',
                        'id_field' => 'uid',
                        'alias_field' => 'thread_subject',
                        'addWhereClause' => ' AND NOT deleted',
/* other stuff might follow here */
                ),
        ),
);



Cheers Ralf


More information about the TYPO3-english mailing list