[MOD] PREVIEW 4 Everything !!! AND WITHOUT THE PAGE YOU ARE
Hi peeps !
So I made dat as a PREVIEW MOD very very simple,
Uve got a buttun to be placed where ever u want on all site.
This open up a POPUP Window which contain a preview code
dat allow to quickly see what u writ down
of course it show result of bbcode, sure my buddy !
OK test this !!!
preview.php
and as an example go edit ur forums php
search after :
EDIT ::::::::::::::: Remenber to writ in YOUR SITE ADRESS !!!!
Where u see ( YOURDOMAIN.XXX ) !!!!!!
EDIT ::::::::::::::: Post updated on TS advice
www.YOURDOMAIN.XXX replaced by <?=$site_config['SITEURL']?>
:P :P :P :P :P :P :P :P
PS ::: MOD Gonna be improved and add ons .... added, iarf , lol :P :)
EDIT :::: Oups Copy and Paste buttons dont work, cos its missing the textarea id attributes,
gonna fix it later.........
Hi peeps !
So I made dat as a PREVIEW MOD very very simple,
Uve got a buttun to be placed where ever u want on all site.
This open up a POPUP Window which contain a preview code
dat allow to quickly see what u writ down
of course it show result of bbcode, sure my buddy !
OK test this !!!
preview.php
<?
require_once("backend/functions.php");
dbconn();
stdhead("Preview post");
begin_frame("Preview Post");
?>
<table width="100%" border="1">
<tr>
<td align="center" style='border: 0;'>
<div align="center">
<p><?=format_comment($body)?></p>
</div>
<table width="100%">
<form method="post" action="?">
<textarea name="body" cols="80" rows="30"><?=$body?></textarea><br>
<div align="center">
<input type="submit" class="btn" value="Preview">
</div>
</form>
</table>
</td>
</tr>
</table>
<?
end_frame();
stdfoot();
?>upload to FTPand as an example go edit ur forums php
search after :
if ($newtopic){
print("<center><table border=0 cellpadding=0 cellspacing=0>
<tr><td><b>Subject:</b><input type=text size=70 maxlength=$maxsubjectlength name=subject ></td></tr><tr><td valign=top>");
print("".textbbcode("Form","body")."</td></tr>");
print("<tr><td colspan=3 align=center><br><input type=submit class=btn value='Submit'><br><br>");
and add below :
?>
<script language="Javascript">
function enter()
{NewWin=window.open('<?=$site_config['SITEURL']?>/preview.php','home',
'width=1000,height=1000,scrollbars=yes,toolbar=yes,status=no,directories=no,m
nubar=no,resizable=yes');}
</script>
<script language="Javascript">
Private Sub CommandButton1_Click()
If TextBox1.SelText <> "" Then
TextBox1.Copy
TextBox2.Paste
'
End If
End Sub
</script>
<?
?>
<button type="button" CommandButton1_Click([copier])>copier</button> <button type="button" CommandButton1_Click([coller])>coller</button>
<?
print ("<br>Use preview page to test ur code easyly<br>");
?>
<button type="button" onclick="java script: enter('Bouton text')">
POP UP Preview
</button>
<?
So NOW enjoy putting dat everywhere u need, EXAMPLE on our Upload page, dat is SO Usefull !!!
Edit torrent-upload and find :
require_once("backend/bbcode.php");
print ("".textbbcode("upload","descr","$descr")."");
And add below :
?>
<script language="Javascript">
function enter()
{NewWin=window.open('<?=$site_config['SITEURL']?>/preview.php','home',
'width=1000,height=1000,scrollbars=yes,toolbar=yes,status=no,directories=no,m
nubar=no,resizable=yes');}
</script>
<button type="button" onClick="copy2Clipboard(document.getElementById('tinfos')">copier</button>
<?
print ("<br>Use preview page to test ur code easyly<br>");
?>
<button type="button" onclick="java script: enter('Bouton text')">
POP UP Preview
</button>
and yessss so much FUN !
Of course there is a usaul way to deal with 2 inpuit button,
But dat will be for another time ....
And my solution I thinkis better,
cos u dont have to preview and reload and edit .....and preview again and reload again and edit again.........
Simply open up use POPUP once,
And keep it opened !!! all time ur doing stuff such as UPLOAD, or FORUM POST, or PM POST...
a last one and I'll sleep a while while
in mailbox php find :
require_once("backend/bbcode.php");
echo "</table>";
print ("".textbbcode("compose","msg","$msg")."");
add below :
?>
<script language="Javascript">
function enter()
{NewWin=window.open('<?=$site_config['SITEURL']?>/preview.php','home',
'width=1000,height=1000,scrollbars=yes,toolbar=yes,status=no,directories=no,m
nubar=no,resizable=yes');}
</script>
<button type="button" onClick="copy2Clipboard(document.getElementById('tinfos')">copier</button>
<?
print ("<br>Use preview page to test ur code easyly<br>");
?>
<button type="button" onclick="java script: enter('Bouton text')">
POP UP Preview
</button>
<?EDIT ::::::::::::::: Remenber to writ in YOUR SITE ADRESS !!!!
Where u see ( YOURDOMAIN.XXX ) !!!!!!
EDIT ::::::::::::::: Post updated on TS advice
www.YOURDOMAIN.XXX replaced by <?=$site_config['SITEURL']?>
:P :P :P :P :P :P :P :P
PS ::: MOD Gonna be improved and add ons .... added, iarf , lol :P :)
EDIT :::: Oups Copy and Paste buttons dont work, cos its missing the textarea id attributes,
gonna fix it later.........