Random Block & Movabletype integration
dreadpiratemark
Joined: 2003-06-08
Posts: 1 |
Posted: Mon, 2003-06-09 00:09 |
This is starting to drive me nuts. I've searched & searched trying to learn how to integrate the Random Block info from Gallery into MovableType. I'd like to have a random picture appear on the index page of MovableType when people load my site & I thought that Random Block was the answer...but I can't make it work. I have Random block working right when you go directly to: http://www.markroberts.org/gallery/block-random.php The problem comes trying to get it to appear in the left column of my blog. I've used the following html, to no avail: <!-- Random Picture--> I've also tried using <?php include("http://www.markroberts.org/gallery/block-random.php"); ?> as the path, but that didn't work either. In slight desperation I tried just dumping it with an <img src="../gallery/block-random.php"> html, but of course that didn't work. So, sorry for the newbie question...but why can't I make this work (::cough, besides the obvious PEBKAC issues, cough:? I'm happy to provide more info if you need it... TIA TIA |
|
Posts: 3
1. Leave random-block.php in your gallery directory.
2. create a new template module, I called it "firstline". (not an index template -- template modules are the last set on the templates screen)
3. add this code to the template:
4. add this code to the top of the Main Index, the Master Archive Index, and each of your Archive-Related templates:
5. add the php code to import the random-block.php file where ever you want the random photo to appear:
Hope it helps
-Nick
http://www.esabine.net
Posts: 3
Nick,
I have tried the above and for some reason it doesn't show up. Now when I view the source of my web page it shows the <?php... (etc) ?> all of the source and doesn't seem to excute the PHP? is there something that you can think of I am doing wrong.
Website - http://www.clowersfamily.com
block-random - http://www.clowersfamily.com/gallery/block-random.php
Thanks in advance,
Jeff
Posts: 3
your php code is not getting executed because it is contained within a .html file instead of .php
(you can tell by viewing the source - if you can still see the php code, then it didn't get executed)
to change index.html to index.php:
log in to movable type
go to templates -> main index
change your output file from "index.html" to "index.php"
rebuild
delete index.html from your server
that should do it!
Posts: 3
Perfect. I had thought it was something like that, it didn't seem to execute it was just there. I am a novice at this these days, things were easier pre-java / etc... and text editors were my only .html editing resource... I need to catch up with the times.
Thanks,
Jeff
Posts: 7
Nsabine,
Thanks, I had the same issue as jclowers and your solution worked perfectly!
Thanks again!
Posts: 9
I have tried this solution myself and I get the following error:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 28832 bytes) in /.../gallery/util.php on line 342
Do you have ideas about what this means?
Posts: 42
Can someone tell me where to get the stand alone version of this? I have been looking but i can't find it!