Firefox PHP

Preview Plugin 0.1

Posted by Vulpes 
Preview Plugin 0.1
May 09, 2001 07:54PM
It's in attachment, download it, install it, tell me what you think.

NOTE: It's beta, there is some poroblems (like loosing cookie, adding \ before quotes, posibly some others)
so if you have idea on how to fix it, its free to post here, any questions free to post here as well.

This plugin let your visitors preview their message (as it will appear in the forum)

It's highly customizable, the features include:
*Turn it on or off whenever you want (phorum plugin have some bug, so you can 'activate' but cant 'deactivate').
*Choose between button and image (image is not fully tested).
*Custom Text inside/path to image.
*Ability to show only what you want (on/off for Author, Host, E-mail, Date).
*You can 'fix' your post in same page.
*Easy to install, all you need is to add a little code to 3 file.

Please do not make any different copies with some stuff added/changed of it without telling me first.

DOWNLOAD it here:
[hackers.phorum.org]
fix
May 15, 2001 06:02PM
to fix \ from appearing in the preview after:

$Sbody=format_body($body);

add

$Sbody=stripslashes($Sbody);
Cees Snoek
Re: fix
May 21, 2001 03:24PM
Hi,
I downloaded the preview hack. In the readme on line 37 is written:
"Upload post_preview.php to your include folder as well."
But it is not included in the zip-file!?

Could you add it?

greetz,

Cees
Re: fix
May 22, 2001 10:50PM
ok, thanks i updated the zip and fix and readme so it's all good to go (hopefully :))
Cees
Re: fix
May 23, 2001 03:18AM
Okay great, but where is it? The link in your previous message still points to the old zip-file :-(
Re: fix
May 23, 2001 04:55PM
jeez, sorry, i will upgrade it today.
Re: fix
May 25, 2001 04:40PM
everything should work now.
Re: fix
June 04, 2001 02:26PM
I just installed and it works great :)
Install note:
don't forget to change the include path in the files (they are currently
hackers.phorum.org specific) and rember to name the files / dir correct (case sensitive)

BTW: works also with the phcode / autourl plugin
Re: fix
June 04, 2001 06:03PM
ok, i should look into it. There is one problem with attachments, if you select something in first form, you will need to put it again in the second. If anybody have any ideas on how to fix it, please post here.
Works great! Even integrated it with php-nuke so that it works with the headers/footers in that software :)
act
Re: Preview plugin 0.1
June 11, 2001 02:31AM
I got this at admin
"Warning: Cannot add header information - headers already sent by (output started at /home/123/b/plugin/plugin.php:15) in /home/123/b/admin/login.php on line 67
version: 3.2.11 | logout
"

and at test page i got this error message
"Warning: Cannot add header information - headers already sent by (output started at /home/123/b/plugin/plugin.php:15) in /home/108-1009/b/post.php on line 104

Warning: Cannot add header information - headers already sent by (output started at /home/108-1009/b/plugin/plugin.php:15) in /home/123/b/post.php on line 174

Any help'd great appriciated.
Re: Preview plugin 0.1
June 11, 2001 02:37AM
did you change all paths in preview plugin files to ur paths?
act
Re: Preview plugin 0.1
June 11, 2001 02:53AM
yeap!
in the file i change /www/hackers.phorum
to mine,i try both
/home/123/b and ./

$fp = @fopen("./plugin/".$plugindirname."/settings.php","w+");
if($fp) {
fputs($fp,$data);
fclose($fp);
} else {
echo('Permission denied for writing "plugin/'.$plugindirname.'/settings.php", please check file permissions.'."\n<br>");
}
} else {
include('./plugin/'.$plugindirname.'/settings.php');

and
$fp = @fopen("/home/108-1009/b/plugin/".$plugindirname."/settings.php","w+");
if($fp) {
fputs($fp,$data);
fclose($fp);
} else {
echo('Permission denied for writing "plugin/'.$plugindirname.'/settings.php", please check file permissions.'."\n<br>");
}
} else {
include('/home/108-1009/b/plugin/'.$plugindirname.'/settings.php');
act
Re: Preview plugin 0.1
June 11, 2001 02:56AM
now i can priview bu tcan not post.
act
Re: Preview plugin 0.1
June 11, 2001 10:45AM
Hi, I got it work!!Thank you VulpesVulpes!
But the preview show with out header and show in small table...
how to show preview in the same format as other(with header and footer and same table size.
Re: Preview plugin 0.1
June 11, 2001 02:37PM
try to play with post_preview.php file.
act
Re: Preview plugin 0.1
June 12, 2001 12:51AM
Thank you Vulpes,but i am real new to this thing and never know with php.So
could you please show me ?
act
Re: Preview plugin 0.1
June 12, 2001 01:06AM
ok, it works! :-)
Re: Preview plugin 0.1
June 14, 2001 11:15PM
Works like a charm! :happy:
Re: Preview plugin 0.1
November 03, 2001 01:46PM
I had to make quite a few changes to this hack to get it to work w/ my set up of phorum version 3.3

Including:

1. Fixed inconsistent Php tags. (Sometimes <? was used, and sometimes <?PHP was used ) My system only recognizes <?PHP

2. Moved 1st three variables in admin.php to a seperate file called info.php

3. fixed spelling mistake in plugin.php previewp_active was spelled preveiwp_active.

Hope this is helpful to anyone trying to use this hack :)
Sorry, you do not have permission to post/reply in this forum.