Redirection after Posting (Phorum Integration in Joomla via addphp)
Posted by pjotr
Re: Redirection after Posting (Phorum Integration in Joomla via addphp) April 05, 2010 12:39PM |
Registered: 15 years ago Posts: 13 |
Hi guys,
I have some good news :-)
First I wrote a Joomla search plugin for integrating the phorum database into the usual Joomla search function (I have integrated some preferences in the administration area for accessing Phorums data base etc.) - it seems to work :-)
I attached it for your tests (together with README and another file for creating the special URLs).
Second I have done many further steps in writing the "Small thread thumbs" module: the administration area is working, the generation of thumbs for older messages is working (thank you Joe for the "template" :-) - and the template modification also work. So at this point you're at least able to do a scanning of all threads in the admin section to update the thumbs: it works.
I'm working now on the different hooks - some already work, some are missing at this moment. But it seems that I will finish the complete module before the weekend. :-)
Searching of the latest attached images of a thread should take place within the following hooks
(please correct me if I missed one or have listed one I don't need!):
- after_approve
- after_merge
- after_split
- hide_thread (may be we have to delete its thumbs then so one one can access them through URL?)
- before_delete
- after_post
Edit: Oops, I have a problem for handling 'after_split'. It solely gives me the thread id of the new thread - but I also need to know the old thread id to update its last thumbs. How could I get this data?
Best regards,
Christoph
Edited 1 time(s). Last edit at 04/06/2010 04:43AM by jogger.
I have some good news :-)
First I wrote a Joomla search plugin for integrating the phorum database into the usual Joomla search function (I have integrated some preferences in the administration area for accessing Phorums data base etc.) - it seems to work :-)
I attached it for your tests (together with README and another file for creating the special URLs).
Second I have done many further steps in writing the "Small thread thumbs" module: the administration area is working, the generation of thumbs for older messages is working (thank you Joe for the "template" :-) - and the template modification also work. So at this point you're at least able to do a scanning of all threads in the admin section to update the thumbs: it works.
I'm working now on the different hooks - some already work, some are missing at this moment. But it seems that I will finish the complete module before the weekend. :-)
Searching of the latest attached images of a thread should take place within the following hooks
(please correct me if I missed one or have listed one I don't need!):
- after_approve
- after_merge
- after_split
- hide_thread (may be we have to delete its thumbs then so one one can access them through URL?)
- before_delete
- after_post
Edit: Oops, I have a problem for handling 'after_split'. It solely gives me the thread id of the new thread - but I also need to know the old thread id to update its last thumbs. How could I get this data?
Best regards,
Christoph
Edited 1 time(s). Last edit at 04/06/2010 04:43AM by jogger.
Re: Redirection after Posting (Phorum Integration in Joomla via addphp) April 07, 2010 03:41AM |
Registered: 15 years ago Posts: 13 |
Hi again :-)
I have created a small module now which should translate my Joomla settings to the forum.
As you can see, I use the JoomFish component and therefore get its language variable which gives me "en" or "de".
Well, it does the right setting - but only the date formatting - e.g. of the forums list - is switched to the new language. The template texts ("Topics", "Login" etc.) are not changed until I reload the page (Iceweasel (Firefox) 3.5.6 under Linux). Using WinXP and IE8 after switching language I also have to reload the page to get the complete translated forum pages.
So it seems that there is a template caching.
I already noticed this behaviour before when I modified the CSS files of Phorum: to get the changes working I always had to clear the browsers cache :-/
This is strange because e.g. Joomla itself loads completely new when clicking the reload button (so CSS modifying was easier).
I also have turned off all caching in the Phorum "Cache settings" section - but it still creates me some files in the Phorum cache folder.
Are there any hints to this behaviour?
My module:
Edited 1 time(s). Last edit at 04/07/2010 03:43AM by jogger.
Quote
Joe Curia
In my Drupal plugin for my External Authentication module, I used the "common_post_user" hook to set the $GLOBALS["PHORUM"]["language"] field based on the url visited. In Drupal, localization is added to the query string (eg. www.drupal.com/node/1/en or www.drupal.com/node/1/ru)
I have created a small module now which should translate my Joomla settings to the forum.
As you can see, I use the JoomFish component and therefore get its language variable which gives me "en" or "de".
Well, it does the right setting - but only the date formatting - e.g. of the forums list - is switched to the new language. The template texts ("Topics", "Login" etc.) are not changed until I reload the page (Iceweasel (Firefox) 3.5.6 under Linux). Using WinXP and IE8 after switching language I also have to reload the page to get the complete translated forum pages.
So it seems that there is a template caching.
I already noticed this behaviour before when I modified the CSS files of Phorum: to get the changes working I always had to clear the browsers cache :-/
This is strange because e.g. Joomla itself loads completely new when clicking the reload button (so CSS modifying was easier).
I also have turned off all caching in the Phorum "Cache settings" section - but it still creates me some files in the Phorum cache folder.
Are there any hints to this behaviour?
My module:
Language: PHP<?php if (!defined ("PHORUM")) return; /* phorum module info title: Set Joomla language desc: This module gets the current Joomla language setting and sets it for Phorum, too. version: 1.0 release_date: 2010-04-06 require_version: 5.2.0 category: integration hook: common_post_user|phorum_mod_joomla_language_common_post_user */ function phorum_mod_joomla_language_common_post_user () { global $PHORUM; switch ($_REQUEST[';jfcookie';][';lang';]) { case ';en';: $PHORUM[';user';][';user_language';] = ';english';; $PHORUM[';language';] = ';english';; break; default: $PHORUM[';user';][';user_language';] = ';german.utf-8';; $PHORUM[';language';] = ';german.utf-8';; } } ?>
Edited 1 time(s). Last edit at 04/07/2010 03:43AM by jogger.
Re: Redirection after Posting (Phorum Integration in Joomla via addphp) April 14, 2010 02:02AM |
Registered: 15 years ago Posts: 13 |
Hi again,
I have integrated the module in my website now. There are still some small changes to do before a first module release - but if someone wants to see the results, look here:
[www.electronic-thingks.de]
If you switch the languages (German <-> English) you will also recognize my problem described above: the new language do not appear instantly in phorum but only in the date values. After reloading the site all is ok.
Best regards,
Christoph (working hard on first module ;-)
I have integrated the module in my website now. There are still some small changes to do before a first module release - but if someone wants to see the results, look here:
[www.electronic-thingks.de]
If you switch the languages (German <-> English) you will also recognize my problem described above: the new language do not appear instantly in phorum but only in the date values. After reloading the site all is ok.
Best regards,
Christoph (working hard on first module ;-)
Sorry, only registered users may post in this forum.