1 tarambana Sep 05, 2007 22:03
3 samredman Sep 06, 2007 03:32
Fernando... could you give a link to your blog so that it could be examined to see if the problem could be identified?
One thing immediately which comes to mind is that stub files are not "created" for you automatically. It sounds like perhaps that you are specifying that you wish to have a stubfile... but not creating one (and if you did, not setting it up properly).
1. In your backoffice when you click the tab "Blog Settings > General." you will see this choice:
http://samredman.com/testdemo/examples/stub1.jpg
2. Notice, in the example, I have entered the name "myblog.php" there. Type in a name that is appropriate to the blog you are creating.
3. Now, in your group of supplied files (from when you installed) there is a model stub file called: a_stub.php (it is in your blog installation root directory).
4. Copy (using an ftp program like Total Commander) that a_stub.php file to your personal computer, so you can use it as your generic stub file guide (to make other stub files for all your blogs).
5. Make a copy of the a_stub.php now, naming it myblog.php (of course, use the blog stub file name you specified).
6. Now open that file in an editor (notepad is fine) and look for this part:
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 = 2; // 2 is for "demo blog A" or your upgraded blog (depends on your install)
7. You will be editing that so that it has the blog number that corresponds to the blog you are creating.
8. Get the correct blog number for your new blog this way:
a. After you saved (clicking "Save" from that Blog settings> general panel) your new blog will be shown in the listings above (we are still in the back office).
b. Put your cursor on the new blog name in the "blog list" at the top and look down below in your browser link info area and you will see this sort of link information:
http://samredman.com/testdemo/admin.php?ctrl=collections&action=edit&blog=5&tab=display
c. The example I have illustrated shows the blog is "5"
9. In your newly created stub file, change this line accordingly:
$blog = 5
10. Save your new stub file. Then, copy it (using your ftp program) to the "root" directory of your blog. It will now be in the same location where you first found your a_stub.php.
11. Now, exit to the blogs (link at the upper right of your backoffice panel) and and you will see your blog displayed.
-
See what that does for you and come back and ask more questions.
4 afwas Sep 06, 2007 03:48
More info is in [url=http://manual.b2evolution.net/Stub_file]the manual[/url], but samredmans post is a far better starter than the text in the docs.
May I add that you can place the stubfile in another directory on the server, so you can call the blog from there?
Good luck
5 samredman Sep 06, 2007 05:28
Afwas said:
May I add that you can place the stubfile in another directory on the server, so you can call the blog from there?
Afwas, I have always wanted to do that... and I have seen a few threads where others talked about wanting to do it. I know that ¥åßßå tried very hard to describe ways get it working (and I know you participated in those discussions) as can be seen in this thread:
http://forums.b2evolution.net/viewtopic.php?t=11360&start=15
... but, to date, I have never seen anything that I have been able to use to make that work.
Somehow getting that path entered correctly for the:
require_once dirname(__FILE__).'/conf/_config.php';
...seems to be a mystery. Do you have any new information about how to do that?
6 afwas Sep 06, 2007 10:06
dirname(__FILE__) points to the actual folder the stub file is in. From there it needs to find th file _config.php. So now you want: actual path -> relative direction to _config.php or in other words: actual path -> road to _config.php.
Hope this helps. If not, give me the data from your site and we will sort it out.
Good luck
7 tarambana Sep 06, 2007 18:22
now I have a blog!
And lots to tinker with.
I would like to customize it and to include mp3 files with enclosers for a podcast. I´ve already seen around post about a hack that allowes you to include these... so...
Soon I´ll be around with moe Qs. Sure!
Thanks a lot
BTW, the problem was the number I was assigning to the stub file didn´t coincide with the number of blogs on the blogs list if you counted them from the top. I would have never guessed!
Thanks again, really appreciated!
8 samredman Sep 06, 2007 21:55
Tarambana - I'm glad it worked for you. If you have any more questions, don't hesitate to ask.
Afwas - thanks, yes, I would like to know how to do that specifically.
I have set up a blog just to examine such things. You can view the blog at this address:
http://samredman.com/testdemo/myblog.php
I, of course, have created a "myblog.php" stub file, which resides in the blog "root." Then, as a test, I put the stubfile in this folder (directory):
http://samredman.com/blogother
(Right now, there is just an index.htm there to act as a marker).
All attempts failed, irrespective of how I tried to put it:
I tried relative references like:
require_once dirname(__FILE__).'/../testdemo/conf/_config.php'; (does not work)
I tried absolute url paths: (but error trapping shows that those are rejected as well):
Just FYI, the total internal server path to that is:
/home/someusername/public_html/testdemo/myblog.php
So I am left with these... how do I change them?
require_once dirname(__FILE__).'/conf/_config.php';
require $inc_path.'_blog_main.inc.php';
?>
Tell me what to try. And I will give as many trials as is necessary to make it work.
9 afwas Sep 06, 2007 22:36
In the stub file, in the folder where you want it, try this before "require once ..." or in stead if this generates an error before the output:
echo dirname(__FILE__);
The path should be set up from here to http://samredman.com/testblog/blog/conf/_config.php or perhaps http://samredman.com/testblog/conf/_config.php.
Good luck
10 yabba Sep 07, 2007 15:29
Hey sam, do you want to create a new thread from this and post working links for where you're testing it ? .... that way, if we come up with a solution it won't be buried ;)
¥
11 samredman Sep 07, 2007 21:07
Yes.. ¥åßßå, I will do that (I fixed the links here to be the working examples).> I have some new things (test examples) to post there. I have created the thread and copy these posts (now with corrected links to the testdemo blog).
Link to new thread:
the version I instaled is:
1.10.2
fernando