phpbb-auction.com Forum Index phpbb-auction.com
Download, Support, Documentation
 
Donate to phpbb-auction.com to support the project


phpbb-Auction
  Home
   - News
   - Bug report/Patches
   - Future Features
  Demo
  Downloads
   - Version 1.3m  (Core /Lang /Mods)
   - Version 1.2m  (Core /Lang /Mods)
   - Version 1.0m  (Core /Lang /Mods)
   - All
  Services
  Documentation
   - Features
   - Documents
   - How-Tos
   - About
  Support
   - English
   - German
  Development
   - Changlog
   - Requests
   - Team
   - CVS
  Community
   - Website of the Month
   - Websites
   - Community Forum
   - Member

Navigation
FAQFAQ
SearchSearch
UsergroupsUsergroups
RegisterRegister
ProfileProfile
Log in to check your private messagesLog in to check your private messages
Log inLog in

Forum
Changing start time auctions
Sun Feb 07, 2010 4:33 am FR
Easy: what code to use to update sql table?
Fri Oct 16, 2009 8:39 am guyb
Unlimited products(downloads)
Wed Oct 14, 2009 7:09 pm hoimyr
Seller chooses currency
Sun Oct 11, 2009 8:00 pm hoimyr
Cant select end date without getting error
Sun Oct 11, 2009 6:43 pm hoimyr

About
Author: FR
Credits:
Brookfresh, Brad Lawryk, Crogon, DaMysterious, EklipzeDesigns, ML, musashi, phpBB Group, phpBB-Auction-Team, php-styles, sanman, Tel, Vampy, wGEric

Supported Sites





Statistics
User: 17722
Posts: 18401
Latest User: ellenjr18

[MOD] BBcode menu light - need testing

 
Post new topic   Reply to topic    phpbb-auction.com Forum Index -> Development
View previous topic :: View next topic  
Author Message
frold
Super Auctioneer
Super Auctioneer


Joined: 16 Feb 2004
Posts: 225

PostPosted: Sun Sep 05, 2004 9:42 am    Post subject: [MOD] BBcode menu light - need testing Reply with quote

Hey

I have made a small very light work-a-round for the BBcode mod, so you now should have the menu...



First of all you need this mod: http://www.phpbb-auction.com/viewtopic.php?t=597

Then Open: auction_add_offer.tpl

Find

Code:
                <form enctype="multipart/form-data" method="post" action="{S_AUCTION_ADD_OFFER_ACTION}">



Before add

Code:
<script language="JavaScript" type="text/javascript">
<!--
var theSelection = false;

var clientPC = navigator.userAgent.toLowerCase();
var clientVer = parseInt(navigator.appVersion);

var is_ie = ((clientPC.indexOf("msie") != -1) && (clientPC.indexOf("opera") == -1));
var is_nav  = ((clientPC.indexOf('mozilla')!=-1) && (clientPC.indexOf('spoofer')==-1)
                && (clientPC.indexOf('compatible') == -1) && (clientPC.indexOf('opera')==-1)
                && (clientPC.indexOf('webtv')==-1) && (clientPC.indexOf('hotjava')==-1));

var is_win   = ((clientPC.indexOf("win")!=-1) || (clientPC.indexOf("16bit") != -1));
var is_mac    = (clientPC.indexOf("mac")!=-1);

var bold  = 0;
var italic = 0;
var underline = 0;
var quote = 0;
var list = 0;
var img = 0;
var url = 0;


function BBCbold() {
   if ((clientVer >= 4) && is_ie && is_win) {
      theSelection = document.selection.createRange().text;
      if (theSelection != '') {
      document.selection.createRange().text = "[B]" + theSelection + "[/B]";
      return;
      }
   }
}

function BBCitalic() {
   if ((clientVer >= 4) && is_ie && is_win) {
      theSelection = document.selection.createRange().text;
      if (theSelection != '') {
      document.selection.createRange().text = "[I]" + theSelection + "[/I]";
      return;
      }
   }
}

function BBCunder() {
   if ((clientVer >= 4) && is_ie && is_win) {
      theSelection = document.selection.createRange().text;
      if (theSelection != '') {
      document.selection.createRange().text = "[U]" + theSelection + "[/U]";
      return;
      }
   }
}

function BBCquote() {
   if ((clientVer >= 4) && is_ie && is_win) {
      theSelection = document.selection.createRange().text;
      if (theSelection != '') {
      document.selection.createRange().text = "[quote]" + theSelection + "[/quote]";
      return;
      }
   }
}

function BBClist() {
   if ((clientVer >= 4) && is_ie && is_win) {
      theSelection = document.selection.createRange().text;
      if (theSelection != '') {
      document.selection.createRange().text = "[list]" + theSelection + "[/list]";
      return;
      }
   }
}

function BBCimg() {
   if ((clientVer >= 4) && is_ie && is_win) {
      theSelection = document.selection.createRange().text;
      if (theSelection != '') {
      document.selection.createRange().text = "[img]" + theSelection + "[/img]";
      return;
      }
   }
}

function BBCurl() {
   if ((clientVer >= 4) && is_ie && is_win) {
      theSelection = document.selection.createRange().text;
      if (theSelection != '') {
      document.selection.createRange().text = "[url]" + theSelection + "[/url]";
      return;
      }
   }
}

//-->
</script>


Find:

Code:
                             <textarea rows="10" cols="55" class="post" type="number" name="auction_offer_text" maxlength="1000" size="255" /></textarea>



Before add:

Code:
   <table width="450" border="0" cellspacing="0" cellpadding="2">
        <span class="gen">
        <tr>
         <td width="450">
           <table width="300" border="0" cellspacing="0" cellpadding="0">
            <tr>
                        <td>
                          <table width="300" border="0" cellspacing="0" cellpadding="0">
                                  <tr align="center" valign="middle">
         <td><span class="genmed">
           <input type="button" class="button" name="bold" value=" B " style="font-weight:bold; width: 30px" onClick="BBCbold()" />
           </span></td>
         <td><span class="genmed">
           <input type="button" class="button" name="italic" value=" i " style="font-style:italic; width: 30px" onClick="BBCitalic()" />
           </span></td>
         <td><span class="genmed">
           <input type="button" class="button" name="under" value=" u " style="text-decoration: underline; width: 30px" onClick="BBCunder()" />
           </span></td>
         <td><span class="genmed">
           <input type="button" class="button" name="quote" value="Quote" style="width: 50px" onClick="BBCquote()" />
           </span></td>
         <td><span class="genmed">
           <input type="button" class="button" name="list" value="List" style="width: 40px" onClick="BBClist()" />
           </span></td>
         <td><span class="genmed">
           <input type="button" class="button" name="img" value="Img" style="width: 40px"  onClick="BBCimg()" />
           </span></td>
         <td><span class="genmed">
           <input type="button" class="button" name="url" value="URL" style="text-decoration: underline; width: 40px" onClick="BBCurl()" />
           </span></td>
        </tr>

                          </table>
                        </td>
                  </tr>

           </table>
         </td>
        </tr>
</table>



I hope someone will test it....

It ONLY work if you have hightlighted some text and then press the button.

It can not:

Finish a tag, if you have open tags like
[B]bold
I donĀ“t know if it work in other browsers then IE6.0 - please test.

Hope it work, if so it is cool Very Happy
Back to top
View user's profile Send private message
frold
Super Auctioneer
Super Auctioneer


Joined: 16 Feb 2004
Posts: 225

PostPosted: Thu Sep 09, 2004 3:09 pm    Post subject: Reply with quote

no feedback?
Back to top
View user's profile Send private message
Crogon
Moderator
Moderator


Joined: 17 May 2004
Posts: 574
Location: Anywhere I'm needed.. which is usually everywhere. ;)

PostPosted: Mon Sep 13, 2004 8:18 am    Post subject: Reply with quote

Well, first off, you already know that I haven't even had a chance to install the new version yet. Too busy.. Razz

Just out of curiosity, why couldn't you use or redirect to use the same code used in the reply box?

I think there is another set of bbcode buttons used for the profile if i recall right, perhaps that could be used?

This is an EXCELLENT idea, but I think it could confuse people if they end up having 2-3 sets of controls that look similar, but don't work the same.

It might be a good idea to post a link so we can see it working. The part about

Quote:
It ONLY work if you have hightlighted some text and then press the button.


is a bit confusing. I assume you mean the text in the box, but other people may be reading it that you have to highlight text, then click a button to use the edit box you have put together.

Good work at any rate! Cool
Back to top
View user's profile Send private message
frold
Super Auctioneer
Super Auctioneer


Joined: 16 Feb 2004
Posts: 225

PostPosted: Mon Sep 13, 2004 5:45 pm    Post subject: Reply with quote

Quote:
I think there is another set of bbcode buttons used for the profile if i recall right, perhaps that could be used?

This is an EXCELLENT idea, but I think it could confuse people if they end up having 2-3 sets of controls that look similar, but don't work the same.


easy to modify but I dont see any reason for the list funktion etc...

Quote:
Quote:
It ONLY work if you have hightlighted some text and then press the button.


is a bit confusing. I assume you mean the text in the box, but other people may be reading it that you have to highlight text, then click a button to use the edit box you have put together.


Nope I mean the javascript only work when some text in the message box is highlighted...

Quote:
Good work at any rate! Cool


Thx Laughing
Back to top
View user's profile Send private message
treebeard
Large-Cap Auctioneer
Large-Cap Auctioneer


Joined: 14 Sep 2004
Posts: 140
Location: Central Command

PostPosted: Sat Oct 30, 2004 5:38 am    Post subject: Reply with quote

How about setting this so that the mouse overs and the 'help box' work as well as closing tags etc? I like the concept of the mod you have stated to develop. I tried to take the code from the 'posting_body.tpl' file to try and get all the same functions as in the forum for the auction postings, but got a bunch of template errors and the mouse overs would not work. I bet someone who is has a working knowledge of php and java would be able to get this to work.
________
Ford Transit Connect history


Last edited by treebeard on Fri Feb 04, 2011 6:53 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Hostmaster
Small-Cap Auctioneer
Small-Cap Auctioneer


Joined: 13 Oct 2004
Posts: 44

PostPosted: Sat Oct 30, 2004 10:22 pm    Post subject: Reply with quote

frold wrote:
no feedback?


It work perfect om my auction.
I just add an explanation in the template how to use it, thats all.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    phpbb-auction.com Forum Index -> Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


phpbb-auction.com - Developed by www.digital-media-lab.com
Sponsored by: www.globibo.com - www.learn2go.de - www.talentone.org - www.language-school.in - www.ping-ke.cn