Welcome to Geeklog, Anonymous Wednesday, December 11 2024 @ 01:15 pm EST
Geeklog Forums
upage v 2.0 released!
Page navigation
Status: offline
amckay
Forum User
Full Member
Registered: 03/23/02
Posts: 180
Hey folks,
My upage plugin now has its own native photo upload, with an easy way to include photos in pages without knowing HTML. There is also support for 'plain text' pages for people who do not know HTML.
Be sure to read all of the below very carefully! And be sure to edit the plugin's config.php after installing but before using!
http://www.bodensatz.com/upage/?page=readme
http://www.bodensatz.com/upage/?page=install
http://www.bodensatz.com/upage/?page=help
cheers,
-Alan
My upage plugin now has its own native photo upload, with an easy way to include photos in pages without knowing HTML. There is also support for 'plain text' pages for people who do not know HTML.
Be sure to read all of the below very carefully! And be sure to edit the plugin's config.php after installing but before using!
http://www.bodensatz.com/upage/?page=readme
http://www.bodensatz.com/upage/?page=install
http://www.bodensatz.com/upage/?page=help
cheers,
-Alan
25
25
Quote
Status: offline
noke
Forum User
Chatty
Registered: 10/22/03
Posts: 37
*laffs* sorry
http://www.worldclubdjs.com
http://www.worldclubdjs.com
23
26
Quote
Status: offline
amckay
Forum User
Full Member
Registered: 03/23/02
Posts: 180
Here is your random photo block.
Put it in /path/to/geeklog/plugins/upage/functions.inc
It will be there by defaut in the next release
function phpblock_UPIC_random()
{
global $_TABLES;
global $_CONF;
global $LANG_UPAGE;
$num = DB_count( $_TABLES['upic'] );
$pic = mt_rand( 1, $num );
$sql = "SELECT *, 'center' as xalign, 'phpblock' as xmode, "
. " 'small' as xscale, 1 as xlink "
. " FROM {$_TABLES['users']}, {$_TABLES['upic']} "
. " WHERE {$_TABLES['users']}.uid = {$_TABLES['upic']}.upic_uid "
. " ORDER BY {$_TABLES['upic']}.upic_uploaded DESC LIMIT " . $pic;
$result = DB_query( $sql );
if ( ! $result )
return;
while ( $pic = DB_fetchArray( $result ) )
$myPic = $pic;
$retr = UPIC_Show( $myPic );
return $retr;
}
Put it in /path/to/geeklog/plugins/upage/functions.inc
It will be there by defaut in the next release
Text Formatted Code
function phpblock_UPIC_random()
{
global $_TABLES;
global $_CONF;
global $LANG_UPAGE;
$num = DB_count( $_TABLES['upic'] );
$pic = mt_rand( 1, $num );
$sql = "SELECT *, 'center' as xalign, 'phpblock' as xmode, "
. " 'small' as xscale, 1 as xlink "
. " FROM {$_TABLES['users']}, {$_TABLES['upic']} "
. " WHERE {$_TABLES['users']}.uid = {$_TABLES['upic']}.upic_uid "
. " ORDER BY {$_TABLES['upic']}.upic_uploaded DESC LIMIT " . $pic;
$result = DB_query( $sql );
if ( ! $result )
return;
while ( $pic = DB_fetchArray( $result ) )
$myPic = $pic;
$retr = UPIC_Show( $myPic );
return $retr;
}
22
23
Quote
Status: offline
amckay
Forum User
Full Member
Registered: 03/23/02
Posts: 180
I think it has to be either a permissions problem on your end, or you installed it incorrectly. I checked the original distribution and it contains that file (and a bunch of junk I do not need so will delete on the next release ;-)). Check the last item below. The file is the same one you downloaded :
heimat# tar tzf /home/www/secure.neap.net/vdirs/download/upage20.tar.Z | grep template
plugins/upage/templates/
plugins/upage/templates/display-default.thtml
plugins/upage/templates/admin.thtml
plugins/upage/templates/index.thtml
plugins/upage/templates/blank.thtml
plugins/upage/templates/admin-functions.thtml
plugins/upage/templates/header.thtml
plugins/upage/templates/one-row.thtml
plugins/upage/templates/user-functions.thtml
plugins/upage/templates/user-prefs.thtml
plugins/upage/templates/one-row2.thtml
plugins/upage/templates/install.thtml
heimat# tar tzf /home/www/secure.neap.net/vdirs/download/upage20.tar.Z | grep template
plugins/upage/templates/
plugins/upage/templates/display-default.thtml
plugins/upage/templates/admin.thtml
plugins/upage/templates/index.thtml
plugins/upage/templates/blank.thtml
plugins/upage/templates/admin-functions.thtml
plugins/upage/templates/header.thtml
plugins/upage/templates/one-row.thtml
plugins/upage/templates/user-functions.thtml
plugins/upage/templates/user-prefs.thtml
plugins/upage/templates/one-row2.thtml
plugins/upage/templates/install.thtml
21
25
Quote
Status: offline
TechSys
Forum User
Regular Poster
Registered: 12/02/03
Posts: 90
Just received the plugin. I will be attempting to do an upgrade this evening. I will let you know if any problems or whatnot.
http://70.145.174.180/
http://70.145.174.180/
28
23
Quote
Status: offline
TechSys
Forum User
Regular Poster
Registered: 12/02/03
Posts: 90
O.k. I just tried upgrading it... didnt work.. I also tried installing it which also didnt work. Here is the error
Template Error: filename: file ./C:/Aeonserv/geeklog/plugins/upage/templates/install.thtml does not exist.
Halted.
When I did the 1.2 install, I had to edit install.php and delete that line, then run the install again. After running the install, I put that very same line back into place and everything worked. This does not happen with 2.0, not sure why.
running upgrade.php, I get the following:
Your upage version : 2.0
Current upage version : 2.0
This is the upgrade program for the upage plugin. It will make some changes to your upage table (one new field for 1.1, one more for 1.2), so please be sure to back up your database before running it, just in case
If you did not already unpack the tarfile to overwrite your previous installation, please do so now.
Full installation instructions are here : http://www.bodensatz.com/upage/?page=install
VERY IMPORTANT
This program only upgrades one upage version at a time. This means that you have to return to this Uprade Home and clicking on the recommended upgrade below, until you finally get the message 'no upgrade required'. So if you are currently using version 1.0, you will see 'Upgrade from 1.0 to 1.1'. You click it and when you return to this page, you will see 'Upgrade from 1.1 to 1.2' and so on. Keep doing this until you see 'no upgrade required'
No upgrade required.
So there shouldn't be any problems, right...wrong. when I click on the upage link I get a blank screen.
I am gonna play around with it and see what's up. I may even get rid of 1.2 all together, then try installing 2.0.. Will let ya know what happens (If I get time to do anything)
http://70.145.174.180/
Template Error: filename: file ./C:/Aeonserv/geeklog/plugins/upage/templates/install.thtml does not exist.
Halted.
When I did the 1.2 install, I had to edit install.php and delete that line, then run the install again. After running the install, I put that very same line back into place and everything worked. This does not happen with 2.0, not sure why.
running upgrade.php, I get the following:
Your upage version : 2.0
Current upage version : 2.0
This is the upgrade program for the upage plugin. It will make some changes to your upage table (one new field for 1.1, one more for 1.2), so please be sure to back up your database before running it, just in case
If you did not already unpack the tarfile to overwrite your previous installation, please do so now.
Full installation instructions are here : http://www.bodensatz.com/upage/?page=install
VERY IMPORTANT
This program only upgrades one upage version at a time. This means that you have to return to this Uprade Home and clicking on the recommended upgrade below, until you finally get the message 'no upgrade required'. So if you are currently using version 1.0, you will see 'Upgrade from 1.0 to 1.1'. You click it and when you return to this page, you will see 'Upgrade from 1.1 to 1.2' and so on. Keep doing this until you see 'no upgrade required'
No upgrade required.
So there shouldn't be any problems, right...wrong. when I click on the upage link I get a blank screen.
I am gonna play around with it and see what's up. I may even get rid of 1.2 all together, then try installing 2.0.. Will let ya know what happens (If I get time to do anything)
http://70.145.174.180/
31
22
Quote
Status: offline
amckay
Forum User
Full Member
Registered: 03/23/02
Posts: 180
upage.tar.Z is softlinked to upage20.tar.Z - same thing
You windoze guys - get a real OS would ya's ;-)
I tested both the fresh install and the upgrade on my UNIX system and they both worked fine. Tested on 2 different websites.
Send me your /path/to/geeklog/plugins/upage/config.php after you edited it as well as your regular geeklog config.php and I'll figure it out.
cheers,
-Alan
You windoze guys - get a real OS would ya's ;-)
I tested both the fresh install and the upgrade on my UNIX system and they both worked fine. Tested on 2 different websites.
Send me your /path/to/geeklog/plugins/upage/config.php after you edited it as well as your regular geeklog config.php and I'll figure it out.
cheers,
-Alan
26
42
Quote
Status: offline
amckay
Forum User
Full Member
Registered: 03/23/02
Posts: 180
Quote by TechSys:running upgrade.php, I get the following:
Your upage version : 2.0
Current upage version : 2.0
Your upage version : 2.0
Current upage version : 2.0
Before you did anything? Very odd.
The first one gets pulled out of the DB, the second is hardcoded in the script. Check your 'plugins' table in your DB to see what version number is in there.
21
24
Quote
Status: offline
amckay
Forum User
Full Member
Registered: 03/23/02
Posts: 180
Quote by ronack: To me it looks like it put in a ./ in front of the path. Where would it do that?
The path in question is compiled thusly
$_CONF['path'] . 'plugins/upage/templates/install.thtml'
So what is your $_CONF['path'] set to?
24
20
Quote
Status: offline
amckay
Forum User
Full Member
Registered: 03/23/02
Posts: 180
I'm going to rewrite that code to get rid of the template. I don't like templates, anyway, and this is one of the few pieces of code I just used verbatim from someone else. If the kids stay calm I may have it ready later this evening ;-)
21
23
Quote
Status: offline
amckay
Forum User
Full Member
Registered: 03/23/02
Posts: 180
OK, evil templates now gone.
Replace your install.php with this file :
https://secure.neap.net/download/install.txt
(rename it .php obviously)
And if it works I'll update the tarball download to include it. Worked fine on my UNIX system.
Replace your install.php with this file :
https://secure.neap.net/download/install.txt
(rename it .php obviously)
And if it works I'll update the tarball download to include it. Worked fine on my UNIX system.
28
20
Quote
Status: offline
destr0yr
Forum User
Full Member
Registered: 07/06/02
Posts: 324
I was getting an error that file_get_contents (line 16 of include.phpi) was an undefined function. Low and behold, it only came into existance in PHP4 >= 4.3.0. My host has 4.2.x
To fix it, i added the following above line 16, as suggested at http://ca2.php.net/file_get_contents
if (!function_exists("file_get_contents")) {
function file_get_contents($filename, $use_include_path = 0) {
$data = ""; // just to be safe. Dunno, if this is really needed
$file = @fopen($filename, "rb", $use_include_path);
if ($file) {
while (!feof($file)) $data .= fread($file, 1024);
fclose($file);
}
return $data;
}
}
-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams
To fix it, i added the following above line 16, as suggested at http://ca2.php.net/file_get_contents
Text Formatted Code
if (!function_exists("file_get_contents")) {
function file_get_contents($filename, $use_include_path = 0) {
$data = ""; // just to be safe. Dunno, if this is really needed
$file = @fopen($filename, "rb", $use_include_path);
if ($file) {
while (!feof($file)) $data .= fread($file, 1024);
fclose($file);
}
return $data;
}
}
-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams
23
23
Quote
Status: offline
destr0yr
Forum User
Full Member
Registered: 07/06/02
Posts: 324
also, on any image upload, i get the following errors:
Warning: fopen("/homepages/12/d88571136/htdocs/okg/public_html/upage/upic/2/Picture007.jpg", "r") - No such file or directory in /homepages/12/d88571136/htdocs/okg/plugins/upage/functions.inc on line 1100
Warning: Cannot use a scalar value as an array in /homepages/12/d88571136/htdocs/okg/plugins/upage/functions.inc on line 932
Warning: Cannot use a scalar value as an array in /homepages/12/d88571136/htdocs/okg/plugins/upage/functions.inc on line 933
the file is successfully saved, but its telling me that it doesnt exist, when in fact it does? i set perms to 777 just to test...
uhh... yah...
one last (nitpicky) thing, if images have spaces, it borks... maybe something that removes the spaces and renames the file?
-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams
Text Formatted Code
Warning: fopen("/homepages/12/d88571136/htdocs/okg/public_html/upage/upic/2/Picture007.jpg", "r") - No such file or directory in /homepages/12/d88571136/htdocs/okg/plugins/upage/functions.inc on line 1100
Warning: Cannot use a scalar value as an array in /homepages/12/d88571136/htdocs/okg/plugins/upage/functions.inc on line 932
Warning: Cannot use a scalar value as an array in /homepages/12/d88571136/htdocs/okg/plugins/upage/functions.inc on line 933
the file is successfully saved, but its telling me that it doesnt exist, when in fact it does? i set perms to 777 just to test...
uhh... yah...
one last (nitpicky) thing, if images have spaces, it borks... maybe something that removes the spaces and renames the file?
-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams
25
24
Quote
Page navigation
All times are EST. The time is now 01:15 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content