Recent Topics

1 Jan 14, 2006 18:28    

I have one instance a b2e, and i need some individuals blogs.
For that, i use stub files.

e2b is in www.domain/blogs/b2evolution/
The stubs files, are un www.domain.com/blog1; www.domain.com/blog2 ; etc.

Each blog is called for a subdomain. Each subdomain it aims to the x folder. For example:
- the subdomain blog1.domain.com > www.domain.com/blog1
- the subdomain blog2.domain.com > www.domain.com/blog2

The sutb file alocated in domain.com/blog1 works well. The problem i have in the links. All links of each blog aims to www.domain/blogs/b2evolution/, where really would link blog1.domain.com/...

In the configuration of b2e, it does not allow me change the domain www.domain/blogs/b2evolution/ for any blog.

I use b2evolution 0.9.1 "Dawn"

I have searching in the forum but i not see a problem similar

Thanks for you help and sory form my bad english :oops:

2 Jan 14, 2006 19:06

what i have done is in my conf file this:

$tempurl = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
if(strstr($tempurl,'balupton.nghosting.info'))
$baseurl = 'http://blog.balupton.nghosting.info/';
else
$baseurl = 'http://blog.balupton.nghosting.org/';
unset($tempurl);

So what you could do is:

$tempurl = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
switch($tempurl){
case 'http://www.domain/blogs/b2evolution/':
$baseurl = 'http://www.domain/blogs/b2evolution/';
break;
case 'http://blog1.domain.com/':
$baseurl = 'http://blog1.domain.com/';
break;
case 'http://blog2.domain.com/':
$baseurl = 'http://blog2.domain.com/';
break;
}
unset($tempurl);


Depending on your version their will either be a '/' or not.

3 Jan 14, 2006 19:48

The error with this code in conf/_config.php is: "Your baseurl () set in _config.php seems invalid. You probably missed the "http://" prefix. Please correct that."

And the code that i used is (to test, i use one subdomain only):

$tempurl = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; 
switch($tempurl){ 
case 'http://www.domain.com/blogs/b2evolution9/': 
$baseurl = 'http://www.domain.com/blogs/b2evolution9/'; 
break; 
case 'http://blog1.domain.com/': 
$baseurl = 'http://blog1.domain.com/'; 
break; 
} 
unset($tempurl);

I tried without "/" too, but no diference.

Thanks!

4 Jan 14, 2006 19:59

at the bottom of ur conf.php do:
echo $baseurl;

to make sure we set it correctly, it will throw alot of errors but that first line is all we care about.

5 Jan 14, 2006 20:04

Actually i know wot we did wrong change the code to:

$tempurl = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
if(strstr($tempurl,'http://www.domain.com/blogs/b2evolution9/'))
$baseurl = 'http://www.domain.com/blogs/b2evolution9/';
else
$baseurl = 'http://blog1.domain.com/';
unset($tempurl);

Because the blog url is always dif eg. index.php?etcetc

So we do does the blog url contain this instead.

6 Jan 14, 2006 20:29

Now, all links aims to blog1.domain.com, inclusive theirs is not in blog1 for example the defautl blog of b2evolutoin.

And the skins don't work too, becuase search yours files inside of blog1.domain.com/...

I don't understand how b2evolution works with subdomians, is too complicated when it's some easy, i think, no?

7 Jan 14, 2006 20:50

echo $tempurl maybe it is not working correctly....

And i use subdomains as well, and works fine for me....

And what is the link to your blog so i can have a more indepth look at wot is going wrong.

9 Jan 14, 2006 21:34

Try

$tempurl = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
if(strstr($tempurl,'blogs/b2evolution9'))
$baseurl = 'http://www.prometeolibros.com/blogs/b2evolution9';
else
$baseurl = 'http://alan1.prometeolibros.com';
unset($tempurl);

And make sure that baseurl is not defined anywhere else in your conf.php and dont worry about the echo...

10 Jan 14, 2006 21:41

Thanks. Now, de defualt b2e works fine but the subdomain not.

Look yourself (are the same links)

11 Jan 14, 2006 21:49

thats because ur stub file is bad.

Warning: main(../blogs/b2evolution9/b2evocore/_blog_main.php): failed to open stream: No such file or directory in /home/prometeo/public_html/blogs/b2evolution9/b_stub.php on line 58

Warning: main(../blogs/b2evolution9/b2evocore/_blog_main.php): failed to open stream: No such file or directory in /home/prometeo/public_html/blogs/b2evolution9/b_stub.php on line 58

Fatal error: main(): Failed opening required '../blogs/b2evolution9/b2evocore/_blog_main.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/prometeo/public_html/blogs/b2evolution9/b_stub.php on line 58

There is no need for a stub file now.

12 Jan 14, 2006 22:01

You are looking stub files that i are testing other days.

Please, look de the previus same links

13 Jan 14, 2006 22:10

http://www.prometeolibros.com/blogs/b2evolution9/index.php?blog=2
Works fine

http://www.prometeolibros.com/blogs/b2evolution9/b_stub.php
Now works fine - it was the link which those erros came from.

http://alan1.prometeolibros.com/b_stub.php
-Looks wierd

http://alan1.prometeolibros.com/index.php?blog=1
Looks fine

http://alan1.prometeolibros.com/index.php?blog=2
Looks fine

Which means its that stub file, but i still dont see the point of a stub file there.

14 Jan 14, 2006 22:19

balupton wrote:

http://www.prometeolibros.com/blogs/b2evolution9/index.php?blog=2
Works fine

http://www.prometeolibros.com/blogs/b2evolution9/b_stub.php
Now works fine - it was the link which those erros came from.

http://alan1.prometeolibros.com/b_stub.php
-Looks wierd

http://alan1.prometeolibros.com/index.php?blog=1
Looks fine

http://alan1.prometeolibros.com/index.php?blog=2
Looks fine

Which means its that stub file, but i still dont see the point of a stub file there.

Actually i have testing differents CMS multiblogs, and some links that you comment are the other CMS (for exmple: http://alan1.prometeolibros.com/index.php?blog=1 - Look downleft the logo of NUCLEUS, other cms)

The links of the b2e are only two:
http://alan1.prometeolibros.com/b_stub.php - That you see, look wired. This is the problem with the last code that you passed me.

http://www.prometeolibros.com/blogs/b2evolution9/ - Works fine, but the links are not correcto (look the link to Blog B. That really aims to alan1. and not is).

Thanks for your pacience.

15 Jan 14, 2006 22:26

Well the code that i pasted is working fine, the problem lies within either ur skin or your stub file.

As the links to the other blogs worked on both locations.

16 Jan 14, 2006 22:43

The skin is the default, i don't change it. And it's funcionally fine previus the insert your code.

The sutb file of http://alan1.prometeolibros.com/b_stub.php


<?php
/**
 * This file is a stub file for displaying a blog, using evoSkins.
 *
 * This file will set some display parameters and then let b2evolution handle
 * the display by calling an evoSkin. (skins are in the /skins folder.)
 *
 * Note: You only need to use this stub file for advanced use of b2evolution.
 * Most of the time, calling your blog through index.php will be enough.
 *
 * Same display without using skins: a_noskin.php
 *
 * b2evolution - {@link http://b2evolution.net/}
 * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
 * @copyright (c)2003-2005 by Francois PLANQUE - {@link http://fplanque.net/}
 *
 * @package evoskins
 * @subpackage noskin
 */

# First, select which blog you want to display here!
# You can find these numbers in the back-office under the Blogs section.
# You can also create new blogs over there. If you do, you may duplicate this file for the new blog.
$blog = 3;   	// 2 is for "demo blog A" or your upgraded blog (depends on your install)

# You could *force* a specific skin here with this setting: (otherwise, default will be used)
# $skin = 'basic';

# This setting retricts posts to those published, thus hiding drafts.
# You should not have to change this.
$show_statuses = array();

# You could *force* a specific link blog here with this setting: (otherwise, default will be used)
# $linkblog = 4;

# This is the list of categories to restrict the linkblog to (cats will be displayed recursively)
# Example: $linkblog_cat = '4,6,7';
$linkblog_cat = '';

# This is the array if categories to restrict the linkblog to (non recursive)
# Example: $linkblog_catsel = array( 4, 6, 7 );
$linkblog_catsel = array( );

# Here you can set a limit before which posts will be ignored
# You can use a unix timestamp value or 'now' which will hide all posts in the past
$timestamp_min = '';

# Here you can set a limit after which posts will be ignored
# You can use a unix timestamp value or 'now' which will hide all posts in the future
$timestamp_max = 'now';

# Additionnaly, you can set other values (see URL params in the manual)...
# $order = 'ASC'; // This for example would display the blog in chronological order...

/**
 * That's it, now let b2evolution do the rest! :)
 */
require(dirname(__FILE__)."/../blogs/b2evolution9/b2evocore/_blog_main.php");
?>


Look the path of images, is here where i think that a possible problem.

Thanks Again! :D


Form is loading...