Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Quick switch Editor Interface (b/w Standard and Enhanced) Details »»
Quick switch Editor Interface (b/w Standard and Enhanced)
Version: 1.00, by mtha mtha is offline
Developer Last Online: May 2016 Show Printable Version Email this Page

Version: 3.0.1 Rating:
Released: 06-20-2004 Last Update: Never Installs: 14
 
No support by the author.

Hack name: Quick switch Editor Interface
Author: HacNho
Version: 1.0.1
Description:
This hack will switch Editor Interface to Standard or Enhanced Editor (WYSIWYG) (in user profile) by one click when you are editing/posting

File to edit: 0
File to upload: 1 (changeinterface.php)
Template to edit: 4 ( editpost, newthread, newreply, pm_newpm)

Limitation:
The pm_newpm only work when sending to 1 user, or pmid exists


Screenshot: EditorInterface.gif (20.2 KB)

Installation:
changeinterface-install.txt (3.4 KB)

Step 1:
Upload
changeinterface.php to your forum directory

Step2:
Edit templates
editpost
...

Step 3:

Edit templates newthread
...

Step 4
Edit templates
newreply
...

Step 5
Edit template pm_newpm


Step 6
Test change interface when (1) edit, (2) post new reply, (3) post new thread, (4) send new PM and reply PM


Do I miss anything?

Maybe a script to autodetect the sending process (edit or reply or newthread or PM) would be nice, so you dont have to edit individual templates ... but I dont know how yet , dont want to execute too many scripts either.


Update: version 1.0.1
- add switch for sending pm
- optimize the php file and templates

(upgrade instruction: redo all the steps)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 06-25-2004, 09:21 PM
marcel-ea marcel-ea is offline
 
Join Date: Oct 2002
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Install and added mod from Ming

Thx to all
Reply With Quote
  #13  
Old 06-26-2004, 04:25 AM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ming Keong
Added a little functionality:

Replace all:
Code:
$bbuserinfo[showvbcode]</a>
with:
Code:
<if condition="$bbuserinfo[showvbcode]=='2'">WYSIWYG Editor<else />Standard Editor</if></a>
just because I dont like seeing that text, that's why.


actually, you just need to use condition once:

HTML Code:
 <if condition="$bbuserinfo[showvbcode]=='2'"> 
(<a href="changeinterface.php?$session[sessionurl]do=newthread&eid=1&f=$foruminfo[forumid]" title="Click to change Editor Interface to Standard">WYSIWYG Editor</a>)
<else />
(<a href="changeinterface.php?$session[sessionurl]do=newthread&eid=2&f=$foruminfo[forumid]" title="Click to change Editor to WYSIWYG Interface">Standard Editor</a>)
</if>

do the same with other templates.


However, if Guest is allowed to post, you may get error if you dont have userid=0. then, adding

<if condition="$bbuserinfo[userid]!=0"> above,
and </if> bellow the code should help.

In my case, if guest, $bbuserinfo[showvbcode] = empty, there's no link
Reply With Quote
  #14  
Old 06-26-2004, 05:23 AM
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack installed .. infact I need it to help some users with bbcodes as one editor does it beter

thanks
Reply With Quote
  #15  
Old 06-26-2004, 06:16 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mtha
just because I dont like seeing that text, that's why.


actually, you just need to use condition once:

HTML Code:
 <if condition="$bbuserinfo[showvbcode]=='2'"> 
(<a href="changeinterface.php?$session[sessionurl]do=newthread&eid=1&f=$foruminfo[forumid]" title="Click to change Editor Interface to Standard">WYSIWYG Editor</a>)
<else />
(<a href="changeinterface.php?$session[sessionurl]do=newthread&eid=2&f=$foruminfo[forumid]" title="Click to change Editor to WYSIWYG Interface">Standard Editor</a>)
</if>

do the same with other templates.


However, if Guest is allowed to post, you may get error if you dont have userid=0. then, adding

<if condition="$bbuserinfo[userid]!=0"> above,
and </if> bellow the code should help.

In my case, if guest, $bbuserinfo[showvbcode] = empty, there's no link
Can you attach the install file with your changes?
Reply With Quote
  #16  
Old 01-21-2005, 08:24 PM
Imperial Fritz Imperial Fritz is offline
 
Join Date: Dec 2003
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Many thanks, I needed this so much...
Reply With Quote
  #17  
Old 02-15-2005, 11:19 PM
Dennis Olson Dennis Olson is offline
 
Join Date: Jul 2004
Location: Wisconsin
Posts: 137
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

when opting for number 2 it is automatically inserting a Quote from the last post.

How to fix?
Reply With Quote
  #18  
Old 02-16-2005, 01:16 AM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dennis Olson
when opting for number 2 it is automatically inserting a Quote from the last post.

How to fix?
open the file changeinterface.php

look for
PHP Code:
        case'newreply':    $url ="newreply.php?$session[sessionurl]do=newreply&p=$p";    break; 

replace by

PHP Code:
        case'newreply':    $url ="newreply.php?$session[sessionurl]do=newreply&noquote=1&p=$p";    break; 
Note, this will put no quote in editing, even if you had "quoted" before.

I wouldnt mind just seeing the quote, select all, and delete it.
Reply With Quote
  #19  
Old 02-16-2005, 01:43 AM
Dennis Olson Dennis Olson is offline
 
Join Date: Jul 2004
Location: Wisconsin
Posts: 137
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mtha
open the file changeinterface.php

look for
PHP Code:
        case'newreply':    $url ="newreply.php?$session[sessionurl]do=newreply&p=$p";    break; 

replace by

PHP Code:
        case'newreply':    $url ="newreply.php?$session[sessionurl]do=newreply&noquote=1&p=$p";    break; 
Note, this will put no quote in editing, even if you had "quoted" before.

I wouldnt mind just seeing the quote, select all, and delete it.
Ideally, the behavior of the editor switch should be:

Whatever was in the text-entry window is carried over into the new editor-window. Nothing added or removed.
Reply With Quote
  #20  
Old 02-26-2005, 09:39 PM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dennis Olson
Ideally, the behavior of the editor switch should be:

Whatever was in the text-entry window is carried over into the new editor-window. Nothing added or removed.
you are right, but "whatever in the text-entry window" is out of my control
I'd love to see it implemented somehow

This is only quick mod and I didnt put all posibilities into account.
Adding auto quote detection option shouldnt be too hard, just need toread the noquote value from url,put into changeinterface.php, and youare done.
I might add the addition sometime later
Reply With Quote
  #21  
Old 03-31-2005, 11:56 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This comes in handy. I use the advanced, but many times there is a need to clean out the extra tags from the cut n paste. That's where this option is very handy. Thanks.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:43 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07684 seconds
  • Memory Usage 2,325KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_html
  • (4)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete