Menu

#33 Changes to configure RSS file directory

open
None
8
2006-08-23
2005-09-11
No

I modified phpwsrssfeeds for puspose of having more
flexibility as to where
the backend files would be written; I don't like long
URLs, and the default is
quite long as well as being a continual advertisement
of the module, which I
found intrusive somehow. So I made the location to be
configurable as shown
here. My only doubt is whether is should be configured
differently for branch
sites, but I have never used those so I am not sure. I
have my phpwebsite
directory in "ws".

I would appreciate feedback: better way to do it, etc.
Jack

1. I added in ws/conf/config.php: added
//$rss_files = "files/phpwsrssfeeds/"; // the default
location
$rss_files = "files/rss/";

2. I added in ws/index.php:
define('PHPWS_RSS_FILES', $rss_files);

3. I made changes to
ws/mod/phpwsrssfeeds/class/backend.php:
278c278
< $dir =
PHPWS_SOURCE_DIR.'files/phpwsrssfeeds/';
---
> $dir = PHPWS_SOURCE_DIR.PHPWS_RSS_FILES;
280c280
< $message["FILE_ERR0"] = "Cannot
create backend file in files/phpwsrssfeeds. ";
---
> $message["FILE_ERR0"] = "Cannot
create backend file in".PHPWS_RSS_FILES.". ";
294c294
< $location =
"http://".PHPWS_HOME_HTTP.'files/phpwsrssfeeds/backend'.$this->_id.'.php';
---
> $location =
"http://".PHPWS_HOME_HTTP.PHPWS_RSS_FILES.'/backend'.$this->_id.'.php';
297c297
< $file =
$GLOBALS['core']->home_dir.'files/phpwsrssfeeds/backend'.$this->_id.'.php';
---
> $file =
$GLOBALS['core']->home_dir.PHPWS_RSS_FILES.'/backend'.$this->_id.'.php';
328c328
<
unlink($GLOBALS['core']->home_dir.'files/phpwsrssfeeds/backend'.$this->_id.'.php');
---
>
unlink($GLOBALS['core']->home_dir.PHPWS_RSS_FILES.'/backend'.$this->_id.'.php');
431c431
< $about =
'http://'.$source_http.'files/phpwsrssfeeds/backend'.$this->_id.'.php';
---
> $about =
'http://'.$source_http.PHPWS_RSS_FILES.'/backend'.$this->_id.'.php';

4. I made changes to
ws/mod/phpwsrssfeeds/boost/install.php:

61c61
< $dir = $GLOBALS['core']->home_dir .
'files/phpwsrssfeeds';
---
> $dir = $GLOBALS['core']->home_dir . PHPWS_RSS_FILES;
70,72c70,72
< $GLOBALS['core']->home_dir .
'files/phpwsrssfeeds/','style.css',0,0)) {
< $content .= 'Unable to copy
'.PHPWS_SOURCE_DIR.'mod/phpwsrssfeeds/templates/style.css
to '
< .$GLOBALS['core']->home_dir .
'files/phpwsrssfeeds/ you will have to do
---
> $GLOBALS['core']->home_dir .
PHPWS_RSS_FILES,'style.css',0,0)) {
> $content .= 'Unable to copy ' .
PHPWS_SOURCE_DIR
.'mod/phpwsrssfeeds/templates/style.css to '
> .$GLOBALS['core']->home_dir .
PHPWS_RSS_FILES . ' you will have to do

5. I made a change to
ws/mod/phpwsrssfeeds/boost/uninstall.php:
49c49
< if(PHPWS_File::rmdir($GLOBALS['core']->home_dir .
"files/phpwsrssfeeds/")) {
---
> if(PHPWS_File::rmdir($GLOBALS['core']->home_dir .
PHPWS_RSS_FILES)) {

Discussion

  • John P Nelson

    John P Nelson - 2005-09-11

    The above note in a text file

     
  • Wendall Cada

    Wendall Cada - 2006-08-23
    • assigned_to: nobody --> wendall911
     
  • Wendall Cada

    Wendall Cada - 2006-08-23
    • priority: 5 --> 8
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.