Results 1 to 14 of 14

Thread: Hi.

  1. #1
    pirate heartbreaker The Man's Avatar
    Join Date
    Mar 2002
    Location
    Sarasota, FL
    Posts
    10,946

    Default Hi.

    Here are some hacks you said you were going to install a long time ago. I'm posting them as attachments, so you now have less obstacles in your way to getting around to them, unless you've changed your mind.

    I'm deleting this thread after the hacks have been installed.

    Peace
    Aaron
    Attached Files Attached Files
    Last edited by The Man; 11-08-2002 at 06:59 PM.
    Don't delay, add The Pimp today! Don't delay, add The Pimp today!
    Fool’s Gold tlsfflast.fm (warning: album artwork may sometimes be nsfw)

  2. #2
    pirate heartbreaker The Man's Avatar
    Join Date
    Mar 2002
    Location
    Sarasota, FL
    Posts
    10,946

    Default Preview Edit

    Originally posted by Mas*Mind
    This is what the hack does: It let's you preview a message when you're editing it, you can only preview when you're posting or replying the way it is now:

    It works on my testserver, but I've not tested on a 'live' forum, but it seems to be working allright...

    Instructions

    1 Backup your editpost.php file!!! and open the original one...

    Then:

    after:

    PHP Code:
    if (!isset($action) or $action=="") {
      
    $action="editpost";

    insert:

    PHP Code:
    if($preview AND $action="updatepost")
        
    $action "editpost"
    after:

    PHP Code:
    if ($action=="editpost") {

      
    // draw nav bar
      
    $navbar=makenavbar($threadinfo[threadid],"thread",1); 
    insert:

    PHP Code:
      if($preview)
      { 
    $parseurl=iif($parseurl=="yes",1,0);
          
    $email=iif($email=="yes",1,0);
          
    $allowsmilie=iif($disablesmilies=="yes",0,1);
          
    $signature=iif($signature=="yes",1,0);
        
        
    $previewmessage=$message;
        
        if (
    $parseurl) {
          
    $previewmessage $postinfo[message]=parseurl($previewmessage);
          }
        
        
    $previewpost=1;
        
    $previewmessage=bbcodeparse($previewmessage,$foruminfo[forumid],$allowsmilie);
        
    $postinfo[message]=$message;    

        if (
    $signature) {
          
    $previewmessage.=bbcodeparse("\n__________________\n$bbuserinfo[signature]",0,$allowsmilies);
        }

        eval(
    "\$postpreview=\"".gettemplate("editpost_postpreview")."\";");

        
    $parseurlchecked=iif($parseurl,"checked","");
        
    $postinfo[allowsmilie] = $allowsmilie;
        
    $postinfo[showsignature] = $signature;
        
    $postinfo[iconid] = $iconid;
        
    $postinfo[title] = $title;
        
    $previewchecked=0;
      }
      else{
           
    $postinfo[message]=htmlspecialchars($postinfo[pagetext]);
        
    $parseurlchecked="CHECKED";
      } 
    Replace:

    PHP Code:
     $postinfo[message]=htmlspecialchars($postinfo[pagetext]); 
    with:

    PHP Code:
    //$postinfo[message]=htmlspecialchars($postinfo[pagetext]); 
    replace:

    PHP Code:
       if ($checkid=$DB_site->query_first("SELECT subscribethreadid FROM subscribethread WHERE userid='$userinfo[userid]' AND threadid=$threadinfo[threadid]")) {
        
    $emailchecked="CHECKED";
      } else {
        
    $emailchecked="";
      } 
    with:

    PHP Code:
       if(!$preview)
          
    $email=$DB_site->query_first("SELECT subscribethreadid FROM subscribethread WHERE userid=$userinfo[userid] AND threadid=$threadinfo[threadid]");
      
    $emailchecked=iif($email,"CHECKED",""); 
    Make a new template called 'editpost_postpreview' with the following content:

    Code:
     <table width=100% border=0 cellspacing=1 cellpadding=4>
    <TR bgcolor="#6c6081">
    <TD valign=middle><smallfont color="#afa3c5"><B>Post Preview:</B></smallfont></TD>
    </TR>
    
    <tr bgcolor="#DEDEDE">
    <td><normalfont>$previewmessage</normalfont></td>
    </tr>
    </table>
    
    <br>
    then edit your 'editpost' template:

    insert the '$postpreview' variable at the appropiate place (look into the 'newthread' template for an example)

    and replace:

    Code:
    <INPUT TYPE="Submit" NAME="SUBMIT" ACCESSKEY="S" VALUE="Submit Now">
    with:

    Code:
    <INPUT TYPE="Submit" NAME="preview" ACCESSKEY="P" VALUE="Preview">
    <INPUT TYPE="Submit" NAME="SUBMIT" ACCESSKEY="S" VALUE="Submit Now">
    All done! Enjoy
    Peace
    Aaron
    Last edited by The Man; 11-12-2002 at 09:23 PM.

  3. #3
    pirate heartbreaker The Man's Avatar
    Join Date
    Mar 2002
    Location
    Sarasota, FL
    Posts
    10,946

    Default Preview New Private Message

    Originally posted by bira
    How to install:

    Open private.php

    1) First we need to move "newmessage" after "dosend". Highlight the entire section between:

    Code:
        // ############################### start new message ###############################
    Until (but not including):

    Code:
        // ############################### start send message ###############################

    Cut this entire section (a total of 83 lines in 2.2.1) and paste it right above:

    Code:
        // ############################### start do stuff (move, etc) ###############################
    2) Now we need to insert the following code:

    a) Find:

    Code:
        $savecopy=iif($savecopy=="yes",1,0);
    Right under it insert:

    Code:
    
        // preview hack
        $pmreceipt=iif($pmreceipt=="yes",1,0);
        // preview hack
        
    b) Find:

    Code:
        if ($pmquota>0 and $touserinfo[usergroupid] != 6 and $bbuserinfo[usergroupid] != 6) {
    Right above it insert:

    Code:
    
        // preview hack
        if ($preview) {
            $previewpost=1;
            $previewmessage=bbcodeparse($message,0,$allowsmilie);
    
            if ($signature) {
                $post['signature'] = bbcodeparse($bbuserinfo['signature'],0,$allowsmilie);
                eval("\$post[signature] = \"".gettemplate("postbit_signature")."\";");
                $previewmessage.=$post['signature'];
            }
    
            eval("\$postpreview=\"".gettemplate("priv_sendpreview")."\";");
    
            $parseurlchecked=iif($parseurl,"checked","");
            $pmreceiptchecked=iif($pmreceipt,"checked","");
            $savecopychecked=iif($savecopy,"checked","");
            $signaturechecked=iif($signature,"checked","");
            $previewchecked=0;
            
            $title = htmlspecialchars($title);
            
            $privatemessageid = $prevmessageid;
            $forward;		
            $subject = $title;
            $privmessage = $message;
            $action="newmessage";
        } else {
        // preview hack
        
    c) Find:

    Code:
        } #end dosend
    Right above it insert:

    Code:
    
        } // preview hack
        
    d) Find:

    Code:
        //show new message form
    Right under it insert:

    Code:
    
        // preview hack
        if (!$pagetext) {
            // parse message for html if previewing
            $message = htmlspecialchars($message); // Without this, a </textarea> in the message breaks the form on preview
        }
        // preview hack
        
    e) Find:

    Code:
        if ($bbuserinfo[userid]!=0 and !$previewpost and $bbuserinfo[signature]!="") {
            $signaturechecked="CHECKED";
        }
    Right under it insert:

    Code:
    
        // preview hack
        if (!isset($parseurl)) {
            $parseurlchecked="CHECKED";
        }
    
        if (!isset($savecopy)) {
            $savecopychecked="CHECKED";
        }
        
        if (!isset($pmreceipt)) {   
            $pmreceiptchecked="CHECKED";
        }
        // preview hack
        
    f) Find:

    Code:
        // /enhanced
        eval("dooutput(\"".gettemplate("priv_sendprivmsg")."\");");
    Right above it insert:

    Code:
    
        // preview hack
        if (!isset($privmessage)) {
            $privmessage = $message[message];
        }
        // preview hack
        

    g) Find:

    Code:
        // enhanced
       $receipt=iif($pmreceipt=="yes",1,0);
       // /enhanced
    And replace it with (the code to remove is marked in red):

    Code:
        // enhanced
       $receipt=iif($pmreceipt,1,0);
       // /enhanced

    Save private.php and upload to server.


    In the Administration control panel -> Templates

    1) ADD template priv_sendpreview and insert to it:

    Code:
    
        <br>
    
        <table cellpadding="0" cellspacing="0" border="0" bgcolor="#555576"  width="100%" align="center"><tr><td>
        <table cellpadding="4" cellspacing="1" border="0"  width="100%">
        <tr>
            <td bgcolor="#8080A6"><smallfont color="#EEEEFF"><b>Message Preview:</b></smallfont></td>
        </tr>
        <tr>
            <td bgcolor="#F1F1F1"><normalfont>$previewmessage</normalfont></td>
        </tr>
        </table>
        </td></tr></table>
        
    (you may edit this to your liking).

    2) Open template priv_sendprivmsg

    a) place $postpreview where you want the message preview to appear (normally would be under $cpnav).

    b) Find:

    Code:
        <textarea name="message" rows="20" cols="$textareacols" wrap="virtual" tabindex="3">$message[message]</textarea>
    And replace it with (change marked in red):

    Code:
        <textarea name="message" rows="20" cols="$textareacols" wrap="virtual" tabindex="3"> $privmessage</textarea>
    c) Find:

    Code:
        <input type="checkbox" name="parseurl" value="yes" checked>
    And replace it with (change marked in red):

    Code:
        <input type="checkbox" name="parseurl" value="yes" $parseurlchecked>
    d) Find:

    Code:
        <input type="checkbox" name="savecopy" value="yes" checked>
    And replace it with (change marked in red):

    Code:
        <input type="checkbox" name="savecopy" value="yes" $savecopychecked>
    e) Find:

    Code:
        <input type="submit" class="bginput" name="submit" value="Send Message" accesskey="s" tabindex="4">
    And replace it with (change marked in red):

    Code:
        <input type="submit" class="bginput" name="submit" value="Send Message" accesskey="s" tabindex="4">
        <input type="submit" class="bginput" name="preview" value="Preview Message" accesskey="p" tabindex="4">

    3) Open template priv_requestreceipt

    Find:

    Code:
        <input type="checkbox" name="pmreceipt" value="yes" checked>
    And replace it with (change marked in red):

    Code:
        <input type="checkbox" name="pmreceipt" value="yes" $pmreceiptchecked>
    That's it!

    Comments and additions welcome.

    Cheers,

    Bira
    Apologies for triple-posting, but table stretching is nasty, so I wanted it to happen as little as possible. You understand, I trust.

    You may need to quote my messages to get certain sections to display properly. Fixed, I hope.

    Peace
    Aaron
    Last edited by The Man; 11-09-2002 at 02:17 AM.
    Don't delay, add The Pimp today! Don't delay, add The Pimp today!
    Fool’s Gold tlsfflast.fm (warning: album artwork may sometimes be nsfw)

  4. #4

    Join Date
    Nov 2003
    Location
    Sup
    Posts
    1,010
    Contributions
    • Former Administrator
    • Former Cid's Knight
    • Former Senior Site Staff

    Default

    attaching TXT files might have been the way to go.
    goku

  5. #5
    pirate heartbreaker The Man's Avatar
    Join Date
    Mar 2002
    Location
    Sarasota, FL
    Posts
    10,946

    Default

    Quote Originally Posted by 38bcee
    Originally posted by Big Ogre Umaro
    attaching TXT files might have been the way to go.
    Yeah. GJ me. I went and replaced every < with &lt; though, so the HTML will display as intended. :aimsmile:

    Now hopefully someone'll get around to installing these. :aimgrin:

    Peace
    Aaron
    Don't delay, add The Pimp today! Don't delay, add The Pimp today!
    Fool’s Gold tlsfflast.fm (warning: album artwork may sometimes be nsfw)

  6. #6
    Not responsible for WWI Citizen Bleys's Avatar
    Join Date
    Feb 2000
    Location
    The Wired
    Posts
    8,502
    Articles
    7
    Blog Entries
    60

    FFXIV Character

    Bleys Maynard (Sargatanas)
    Contributions
    • Former Administrator
    • Former Cid's Knight

    Default

    Somebody send me a PM sometime Monday night; I'll be too busy to install anything before then, and I don't want to forget.

    Thanks in advance.

  7. #7
    pirate heartbreaker The Man's Avatar
    Join Date
    Mar 2002
    Location
    Sarasota, FL
    Posts
    10,946

    Default

    Yay, it's so... beautiful! The only problems are:
    1. The preview PM thingy uses the wrong colours; the background is white, which I don't think is what we want.
    2. A buncha extra line breaks after the edit thingy now. This is mostly an aesthetic thing; it doesn't matter that much, but you might want to fix it anyway.
    3. Unfortunately, the backup messages thing reads HTML in messages as HTML rather than converting it to text. It's no big deal, though; it's not that important. A bigger problem is that line breaks get lost, but oh well.
    At any rate, life at EoFF just got much easier. Thank you muchly. <3

    Peace
    Aaron
    Don't delay, add The Pimp today! Don't delay, add The Pimp today!
    Fool’s Gold tlsfflast.fm (warning: album artwork may sometimes be nsfw)

  8. #8
    Not responsible for WWI Citizen Bleys's Avatar
    Join Date
    Feb 2000
    Location
    The Wired
    Posts
    8,502
    Articles
    7
    Blog Entries
    60

    FFXIV Character

    Bleys Maynard (Sargatanas)
    Contributions
    • Former Administrator
    • Former Cid's Knight

    Default

    I installed those hacks as per the instructions.

    Problem is, the hacks, as instructed, used a bunch of hardcoded colors that match vBulletin's color scheme, instead of the variables ({firstaltcolor}, etc), so it doesn't automatically match the board.

    We're probably going to have to get rid of the preview edit, though, since it's not working properly (it submits changes to the database when you press "preview", so if you want to go back to your original message, you're SOL. Plus, people can view and reply to a message you're supposedly "previewing"

    It's a bad hack.

  9. #9
    ORANGE Dr Unne's Avatar
    Join Date
    Dec 1999
    Posts
    7,394
    Articles
    1
    Contributions
    • Former Administrator
    • Former Developer
    • Former Tech Admin

    Default

    It's a bad hack. --Bleys

    Slightly reworded: Hacks are bad. *nod*

  10. #10
    Not responsible for WWI Citizen Bleys's Avatar
    Join Date
    Feb 2000
    Location
    The Wired
    Posts
    8,502
    Articles
    7
    Blog Entries
    60

    FFXIV Character

    Bleys Maynard (Sargatanas)
    Contributions
    • Former Administrator
    • Former Cid's Knight

    Default

    Dunno, I like our shiny "Administrator", "Cid's Knight" and "Recognized Member" titles

  11. #11
    ORANGE Dr Unne's Avatar
    Join Date
    Dec 1999
    Posts
    7,394
    Articles
    1
    Contributions
    • Former Administrator
    • Former Developer
    • Former Tech Admin

    Default

    Fine. Hacks that aren't written by Bleys are bad.

  12. #12
    Not responsible for WWI Citizen Bleys's Avatar
    Join Date
    Feb 2000
    Location
    The Wired
    Posts
    8,502
    Articles
    7
    Blog Entries
    60

    FFXIV Character

    Bleys Maynard (Sargatanas)
    Contributions
    • Former Administrator
    • Former Cid's Knight

    Default

    Raf wrote that hack

  13. #13
    Recognized Member Scottie's Avatar
    Join Date
    Jun 2000
    Location
    Jersey
    Posts
    415
    Articles
    3
    Contributions
    • Former Administrator

    Default

    Poor Unne is gonna go postal on you.

  14. #14
    Super-Rad Recognized Member Spatvark's Avatar
    Join Date
    Oct 2001
    Location
    The Mysterious Island of Bigfoot Women
    Posts
    2,098
    Articles
    7
    Contributions
    • Former Cid's Knight
    • Former Senior Site Staff

    Default

    Hacks that aren't written by current EoFF staff are bad.

    So, that dumps ACMLM out on his arse but to be fair, some of his hacks were truly terrible as well =P
    Seriously the best band in the world.
    And here's where I'll stay / For ten years and a day
    We're on a quest to find hidden treasure / And mystery on The Wild Sea

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •