Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
IOS Hotels
and
IOS Rentals
online booking systems for Elxis CMS.
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
Elxis 4.x/5.x DEV
»
logo_rss.png - not possible manage in multisite. tips to manage it? [SOLVED]
« previous
next »
Print
Pages: [
1
]
Author
Topic: logo_rss.png - not possible manage in multisite. tips to manage it? [SOLVED] (Read 5076 times)
speck
Elxis Community
Sr. Member
Posts: 348
logo_rss.png - not possible manage in multisite. tips to manage it? [SOLVED]
«
on:
April 27, 2013, 07:58:12 »
i finish a template and it seems is not possible to manage the image logo_rss.png in multisite.
how can solve this problem without put the hands to elxis4 code?
is possible to fix this in new version?
«
Last Edit: May 07, 2013, 09:52:53 by speck
»
Logged
webgift
Elxis Team
Hero Member
Posts: 4193
Re: logo_rss.png - not possible manage in multisite. tips to manage it?
«
Reply #1 on:
April 29, 2013, 10:18:45 »
In case of multisite option is enabled, Elxis use the same file system as the root one. So we can't change an image like that.
How can we check if Elxis multisite option is enable and change the image base
$elxis = eFactory::getElxis();
$imgbase = 'media/images/';
if (defined('ELXIS_MULTISITE')) {
if (ELXIS_MULTISITE > 1) {
$imgbase = 'media/images/site'.ELXIS_MULTISITE.'/';
}
}
if (file_exists(ELXIS_PATH).'/'.$base.'myimage.png') {
echo '<img src="'.$elxis->secureBase().'/'.$base.'.myimage.png" width="200" height="100" alt="my image" />';
}
Logged
Elxis Team •
Custom web design [EN]
-
[EL]
•
.GR Registrar
datahell
Elxis Team
Hero Member
Posts: 10356
Re: logo_rss.png - not possible manage in multisite. tips to manage it?
«
Reply #2 on:
April 29, 2013, 11:37:21 »
Elxis feeds class does support that but the content component that actually generates the feed doesn't make use of this feature.
You have to make a small modification in component
content
.
Open file
components/com_content/controllers/generic.php
Go to line 150:
$feed->addChannel($channel_title, $channel_link, $elxis->getConfig('METADESC'));
And change it to:
$feed_image = '';
if (defined('ELXIS_MULTISITE')) { if (ELXIS_MULTISITE > 1) { $feed_image = $elxis->secureBase().'/media/images/logo_rss'.ELXIS_MULTISITE.'.png'; } }
$feed->addChannel($channel_title, $channel_link, $elxis->getConfig('METADESC'), $feed_image);
Now, put your images in folder
media/images/
The logo for the mother site (id = 1) is the default one:
media/images/logo_rss.png
For multisite with id = 2 will be
media/images/logo_rss2.png
For multisite with id = 3 will be
media/images/logo_rss3.png
etc...
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
speck
Elxis Community
Sr. Member
Posts: 348
Re: logo_rss.png - not possible manage in multisite. tips to manage it?
«
Reply #3 on:
April 29, 2013, 13:41:28 »
thanks datahell and thanks to stravos for your help as forever,
i've already tried the solution of webgift, but nothing, in the meantime i prefer to not modify the elxis code it because in a new template for elxis i developed, there's the possibility to change the logo image for rss too. but trying in multisite i saw not works.
if it was for me, looking the code i've found by myself where to apply the modifies, but the template is not for me but for u want use it, so i prefer the people don't put the hand to elxis code. i'll put an advice that under multisite is not possilble to have different logo for rss, also beacuse beeing a commercial template i bet will be very difficult the people will use the template under multisite with different logo for rss.
if is possible, maybe will be nice to apply this modify in new elxis.
«
Last Edit: April 29, 2013, 14:34:55 by speck
»
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: logo_rss.png - not possible manage in multisite. tips to manage it?
«
Reply #4 on:
April 29, 2013, 17:45:27 »
If you dont want to modify the Elxis core then do it via
htaccess
.
It is easy. Put re-write rules like the ones shown below exactly after "RewriteBase /" in your htaccess file.
RewriteRule ^xxxxx/media/images/logo_rss.png /media/images/logo2.png [L,R=301,NC]
RewriteRule ^yyyyy/media/images/logo_rss.png /media/images/logo3.png [L,R=301,NC]
etc...
Where
xxxxx
the base name for the 2nd multi-site,
yyyyy
the base name for the 3rd multi-site, etc...
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
speck
Elxis Community
Sr. Member
Posts: 348
Re: logo_rss.png - not possible manage in multisite. tips to manage it?
«
Reply #5 on:
May 01, 2013, 11:09:36 »
woowwww
thanks a lot... great help.
i'm debit of another bier with u
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: logo_rss.png - not possible manage in multisite. tips to manage it?
«
Reply #6 on:
May 01, 2013, 11:55:03 »
Beer accepted, hic!
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
Elxis 4.x/5.x DEV
»
logo_rss.png - not possible manage in multisite. tips to manage it? [SOLVED]