PDA

View Full Version : How 2 make any whatyoulike_template.html the default one?


Aria
12-06-2007, 01:58 PM
Hello!
I installed the mosaic add-on and I would love to make it the default page the index.php is loading. But the problem is that if I hack the index.php putting mosaic_template.html instead of image_template.html all the thumbnails in the site don't work anymore (they don't open the linked image).
Is there any hack or idea to solve my problem? I think it could be usefull for everyone!
Thanx a lot for the support,
peace,
Aria

jaywilliams
12-06-2007, 07:12 PM
Here is a pretty simple solution that should do the trick quite well.

Simply open up the file ./includes/pixelpost.php and add these lines near the bottom:

if(!isset($_GET['x']) AND !isset($_GET['showimage'])){
$_GET['x'] = 'mosaic';
}


Then save the changes and re-upload the file.

Now your default page will be "mosaic".

Likewise, if you wanted your default index page to be the about page, you could do this:
if(!isset($_GET['x']) AND !isset($_GET['showimage'])){
$_GET['x'] = 'about';
}

Aria
12-07-2007, 02:22 PM
Great! It works perfectly, much thanx!
Aria

diogobento
05-30-2008, 01:15 PM
Hey Jay Williams,

Any other pretty simple solution for the entry page to start at index.php#photobox?

Thanks a lot,
Diogo

mowopi
05-31-2008, 06:11 PM
Dennis created an addon :

http://www.schonhose.nl/pixelpost-addons/entrypage/

diogobento
06-02-2008, 01:01 AM
Thanks for the tip, but that particular addon doesn't allow me to setup the entry page at index.php#photobox.

peace!

jaywilliams
06-02-2008, 03:12 AM
The easiest way to auto-jump to a specific anchor point would be use Javascript.

Something like this should work:
<body onLoad="window.location = '#photobox'">
(not tested)

diogobento
06-04-2008, 04:26 PM
Works perfectly!

thanks.

Farbenstern
06-07-2008, 09:38 AM
it doesn´t works at all

Farbenstern
06-07-2008, 09:48 AM
<?php


// database variables - this is info you've received from you hosting service
// those are needed for the script to connect and use MySQL

$pixelpost_db_host = "xxx"; // database host, often "localhost"
$pixelpost_db_user = "xxx"; // database user
$pixelpost_db_pass = "xxx"; // database user password
$pixelpost_db_pixelpost = "xxx"; // database

$pixelpost_db_prefix = "xxx"; // table prefix, leave as is unless you want to install multiple blogs on the same database


// Make changing starting site

if(!isset($_GET['x']) AND !isset($_GET['showimage'])){
$_GET['x'] = 'about';
}
?>

It dosn´t work :(

jaywilliams
06-07-2008, 04:23 PM
What is the address of your site?

Farbenstern
06-07-2008, 05:50 PM
http://www.farbenstern.com/album-pp/index.php

jaywilliams
06-09-2008, 07:24 PM
It should work, if it doesn't try turning off your addons, and test it then. It's possible an addon is interfering with the code.