php forum
php mysql forum
php mysql smarty
 
Page 3 of 5 < 1 2 3 4 5 >
Topic Options
#150762 - 11/03/02 10:20 PM Re: [6.3x] Smarter Looking Quotes and Codes [Finished]
Felix 10 Offline
Enthusiast

Registered: 10/10/02
Posts: 391
Loc: Toronto

   Re: [6.3x] Smarter Looking Quotes and Codes [Finished] to Del.icio.us Add to del.icio.us
  Digg Re: [6.3x] Smarter Looking Quotes and Codes [Finished] Digg it
Thank you

Top
#150763 - 11/07/02 11:41 AM Re: [6.3x] Smarter Looking Quotes and Codes [Finished]
Tama-chan Offline
Junior Member

Registered: 01/09/02
Posts: 5
Easiest mod I've ever installed. laugh

Would there be a way to put more spacing around the quote and the reply area? When multple quotes are used the text gets so cramped it's kinda hard to read.... maybe a way to add tranparent gifs before and after the quoted field?

[edit] - figured this would be easier to understand with an example:

Too cramped:


Would help a lot:

Top
#150764 - 11/07/02 08:51 PM Re: [6.3x] Smarter Looking Quotes and Codes [Finished]
CaCoffin Offline
Member

Registered: 12/02/00
Posts: 152
Loc: Las Vegas, NV
I added
s or was it

s to the quote translating code so there is gap after the quotes - been awhile - but it is possible

Top
#150765 - 11/09/02 08:59 AM Re: [6.3x] Smarter Looking Quotes and Codes [Finished]
CaCoffin Offline
Member

Registered: 12/02/00
Posts: 152
Loc: Las Vegas, NV
Sorry for the bad information it has just been awhile since I added the MOD.

Within the code for the header insert:

Code:
<style type="text/css"> 
blockquote {
  font-size: 9pt;
  border: 1px solid #4577AB;
  background: #FDF5E6;
  color: black;
  margin: 8px 20px;
  padding: 0px 10px
}
blockquote .small {
  background:#34669A;
  color: white;
  margin-left:-10px;
  padding:1px 2px
}
blockquote hr {
  visibility:hidden;
  height:1px
}
blockquote br {
  font-size:8px
}
 a:visited {
  text-decoration: none
}
 a:link {
  text-decoration: none
}
 a:hover {
  color: #008000;
  font: italic;
  text-decoration: none
}
 a:active {
  text-decoration: none
}
</style>
It is the padding that adds the spacing around the outside of the quote block.

The MOD as written has a padding of ZERO.

As you look over the code above you will see I increased it to 10px.

This is the code that gets inserted into the header insert section.

Which is located in the Style Template you are using for your board.

Top
#150766 - 11/09/02 09:09 AM Re: [6.3x] Smarter Looking Quotes and Codes [Finished]
CaCoffin Offline
Member

Registered: 12/02/00
Posts: 152
Loc: Las Vegas, NV
Oh and that is the first padding which sets up the padding around the outside of the entire quote block.

The next padding sets up the padding around the small quote: or code: set.

For those of you who would like different options for quotes and codes (such as a Christian board quoting the Bible) it is easy, using this MOD, to set up another code such as for my example I added a special tag for our users when quoting the Bible.

Code:
[bible]add bible quote[/bible]
Which simply puts the words "Bible Quote" in the small block. As seen here: http://iambornagainru.org/cgi-bin/bab/ultimatebb.cgi?ubb=get_topic&f=3&t=000561#000002

It is nothing really, but offering your users a specialized quote or whatever can be very useful.

Top
#150767 - 11/09/02 09:22 AM Re: [6.3x] Smarter Looking Quotes and Codes [Finished]
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
Or maybe you can use
Code:
[bible=Ephesians 1:16]do not cease ...[/bible]
To make the ephesians 1:16 wording look more special?

Or of course, in the future (if someone can give me a vars file with the whole bible) we could make it [bible=Ephesians]1:16[/bible] and it will post the quote for you wink
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#150768 - 11/09/02 01:12 PM Re: [6.3x] Smarter Looking Quotes and Codes [Finished]
CaCoffin Offline
Member

Registered: 12/02/00
Posts: 152
Loc: Las Vegas, NV
LK! That would be fantastic!!!

I'll get that for you - one that is in the public domain.

That would be fantastic!

Top
#150769 - 11/09/02 01:15 PM Re: [6.3x] Smarter Looking Quotes and Codes [Finished]
CaCoffin Offline
Member

Registered: 12/02/00
Posts: 152
Loc: Las Vegas, NV
LK this site ( http://www.bf.org/bfetexts.htm ) has several text files of various versions.

Can you take a look and see if they are useable? If not then let me know what needs to be changed and I'll do the work.

Top
#150770 - 11/09/02 02:20 PM Re: [6.3x] Smarter Looking Quotes and Codes [Finished]
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
I made a version that works with "darbybib.zip" in that URL. It works with bbe.zip and av.zip as well, as long as you rename the extension to ".DBY".

Instructions: download the darbybib.zip file, and upload all its files to cgi-bin/bible dir.
open ubb_lib.cgi.
Find:
Quote:
code:</font><hr />
Code:
		$match++ if $_[0] =~ s/([QUOTE])(.+?)([/QUOTE])(s|n|r)*/ </font><blockquote><font size="1" face="$vars_style{FontFace}">$vars_wordlets{ubbcode_quote}:</font><hr /><font size="$vars_style{TextSize}" face="$vars_style{FontFace}">$2</font><hr /></blockquote><font size="$vars_style{TextSize}" face="$vars_style{FontFace}">/isg;
<hr /></blockquote>Add below:<blockquote><font class="small">code:
[qb]
Code:
		$match++ if $_[0] =~ s/[BIBLE=([A-Za-z0-9s]+)](d+):(d+)[/BIBLE]/&bible($1,$2,$3)/eisg;
[/qb]
Find:
Quote:
code:</font><hr />
Code:
} # end listize
<hr /></blockquote>Add below:<blockquote><font class="small">code:
[qb]
Code:
sub bible {
	my ($a, $b, $c) = @_;
	$a =~ s/^(.*?)$/U$1E/;
	if (&FileExists("$vars_config{CGIPath}/bible/$a.DBY")) {
		my $file = &OpenFileAsString("$vars_config{CGIPath}/bible/$a.DBY");
		if ($file =~ m/$b:$c /) {
			$file =~ s/(.*?)$b:$c//isg;
			$d = $b+1; $e = $c+1;
			$file =~ s/$d:1(.*?)$//isg; $file =~ s/$b:$e(.*?)$//isg;
			return &ConvertReturns($file);
		}
	}
	return "[BIBLE=$a] $b:$c [/BIBLE]";
}
[/qb]
Then use
Quote:
code:</font><hr />
Code:
[quote][bible=EPH]1:16[/bible][/quote]
<hr /></blockquote>Result: <blockquote><font class="small">code:
[qb]
Code:
do not cease giving thanks for you, making mention [of you]
 at my prayers,
[/qb]
Note: if you give me a list of all long names (like John) with their short form (like JOH) I can make it so you can type [bible=John] instead of [bible=joh]...

After we get it to work like that, I'll make it like you want it to be if you wish - like [quote] but with "Bible Quote" and make the name more emphasized

Edit: now it works with darbybib.zip instead of bbe.zip cause I think it's better.. Note: I haven't tested it since I modified it to read .dby, so lemme know if it doesn't work
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#150771 - 11/09/02 03:16 PM Re: [6.3x] Smarter Looking Quotes and Codes [Finished]
Matt Jacob Offline
Master Hacker

Registered: 09/13/00
Posts: 4389
Loc: Tucson, Arizona
Quote:
quote:
Originally posted by LK:
if you give me a list of all long names (like John) with their short form (like JOH)
Here you go, in order of appearance:
Old Testament
Gen.
Ex.
Lev.
Num.
Deut.
Josh.
Judg.
Ruth
1 Sam.
2 Sam.
1 Kings
2 Kings
1 Chron.
2 Chron.
Ezra
Neh.
Est.
Job
Ps.
Prov.
Eccl.
Song
Isa.
Jer.
Lam.
Ezek.
Dan.
Hos.
Joel
Amos
Obad.
Jonah
Mic.
Nah.
Hab.
Zeph.
Hag.
Zech.
Mal.

New Testament
Matt.
Mark
Luke
John
Acts
Rom.
1 Cor.
2 Cor.
Gal.
Eph.
Phil.
Col.
1 Thess.
2 Thess.
1 Tim.
2 Tim.
Titus
Philem.
Heb.
James
1 Peter
2 Peter
1 John
2 John
3 John
Jude
Rev.

Top
#150772 - 11/09/02 03:33 PM Re: [6.3x] Smarter Looking Quotes and Codes [Finished]
CaCoffin Offline
Member

Registered: 12/02/00
Posts: 152
Loc: Las Vegas, NV
There is a standard 3 letter abbreviations list, which is as follows:

OT:

GEN - Genesis
EXO - Exodus
LEV - Levitcus
NUM - Numbers
DEU - Deuteronomy
JOS - Joshua
JGS - Judges
RTH - Ruth
1SAM - 1 Samuel
2SAM - 2 Samuel
1KGS - 1 Kings
2KGS - 2 Kings
1CHR - 1 Chronicles
2CHR - 2 Chronicles
EZR - Ezra
NEH - Nehemiah
EST - Esther
JOB - Job
PSA - Psalms
PRO - Proverbs
ECC - Ecclesiastes
SOL - Song of Solomon
ISA - Isiah
JER - Jeremiah
LAM - Lamentations
EZE - Ezekiel
DAN - Daniel
HOS - Hosea
JOE - Joel
AMO - Amos
OBA - Obadiah
JON - Jonah
MIC - Micah
NAH - Nahum
HAB - Habakuk
ZEP - Zephaniah
HAG - Haggai
ZEC - Zechariah
MAL - Malachi

NT:

MAT - Matthew
MAR - Mark
LUK - Luke
JNO - John
ACT - Acts
ROM - Romans
1COR - 1 Corinthians
2COR - 2 Corinthians
GAL - Galatians
EPH - Ephesians
PHI - Philippians
COL - Colossians
1THS - 1 Thessalonians
2THS - 2 Thessalonians
1TIM - 1 Timothy
2TIM - 2 Timothy
TIT - Titus
PHN - Philemon
HEB - Hebrews
JAS - James
1PET - 1 Peter
2PET - 2 Peter
1JNO - 1 John
2JNO - 2 John
3JNO - 3 John
JUD - Jude
REV - Revelation

I think that is the whole list.

Thanks again for the work you are doing on this!

Top
#150773 - 11/09/02 04:10 PM Re: [6.3x] Smarter Looking Quotes and Codes [Finished]
CaCoffin Offline
Member

Registered: 12/02/00
Posts: 152
Loc: Las Vegas, NV
LK, it would be very helpful, if it is possible, that the book chapter:verse reference is included in the quote too.

Top
#150774 - 11/10/02 12:09 AM Re: [6.3x] Smarter Looking Quotes and Codes [Finished]
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
Try the following sub bible, including the whole Old Testament
Code:
sub bible {
	my ($orig, $b, $c) = @_;
	$a = $orig;
	$a =~ s/^(GEN|Genesis)$/GE/i;
	$a =~ s/^(Exodus|EXO)$/EX/i;
	$a =~ s/^(LEV|Levitcus)$/LE/i;
	$a =~ s/^(NUM|Numbers)$/NU/i;
	$a =~ s/^(DEU|Deuteronomy)$/DE/i;
	$a =~ s/^(JOS|Josh|Joshua)$/JOS/i;
	$a =~ s/^(JGS|Judges)$/JUD/i;
	$a =~ s/^(RTH|Ruth)$/RU/i;
	$a =~ s/^(1SAM|1.*?Samuel)$/1SA/i;
	$a =~ s/^(2SAM|2.*?Samuel)$/2SA/i;
	$a =~ s/^(1KGS|1.*?Kings)$/1KI/i;
	$a =~ s/^(2KGS|2.*?Kings)$/2KI/i;
	$a =~ s/^(1CHR|1.*?Chronicles)$/1CH/i;
	$a =~ s/^(2CHR|2.*?Chronicles)$/2CH/i;
	$a =~ s/^Ezra$/EZR/i;
	$a =~ s/^(NEH|Nehemiah)$/NE/i;
	$a =~ s/^(EST|Esther)$/ES/i;
	$a =~ s/^(PSA|Psalms)$/PS/i;
	$a =~ s/^(PRO|Proverbs)$/PR/i;
	$a =~ s/^(ECC|Ecclesiastes)$/EC/i;
	$a =~ s/^(SOL|Song.*?Solomon|Song.*?Songs)$/SO/i;
	$a =~ s/^Isiah$/ISA/i;
	$a =~ s/^Jeremiah$/JER/i;
	$a =~ s/^(LAM|Lamentations)$/LA/i;
	$a =~ s/^Ezekiel$/EZE/i;
	$a =~ s/^(DAN|Daniel)$/DA/i;
	$a =~ s/^(HOS|Hosea)$/HO/i;
	$a =~ s/^Joel$/JOE/i;
	$a =~ s/^(AMO|Amos)$/AM/i;
	$a =~ s/^(OBA|Obadiah)$/OB/i;
	$a =~ s/^Jonah$/JON/i;
	$a =~ s/^Micah$/MIC/i;
	$a =~ s/^(NAH|Nahum)$/NA/i;
	$a =~ s/^Habakuk$/HAB/i;
	$a =~ s/^Zephaniah$/ZEP/i;
	$a =~ s/^Haggai$/HAG/i;
	$a =~ s/^Zechariah$/ZEC/i;
	$a =~ s/^Malachi$/MAL/i;
	$a =~ s/^(.*?)$/U$1E/;
	if (&FileExists("$vars_config{CGIPath}/bible/$a.DBY")) {
		my $file = &OpenFileAsString("$vars_config{CGIPath}/bible/$a.DBY");
		if ($file =~ m/$b:$c /) {
			$file =~ s/(.*?)$b:$c//isg;
			$d = $b+1; $e = $c+1;
			$file =~ s/$d:1(.*?)$//isg; $file =~ s/$b:$e(.*?)$//isg;
			return qq~ </font><blockquote><font size="1" face="$vars_style{FontFace}">bible quote:</font><hr /><font size="$vars_style{TextSize}" face="$vars_style{FontFace}"><b>$orig $b:$c</b>
~.&ConvertReturns($file).qq~</font><hr /></blockquote><font size="$vars_style{TextSize}" face="$vars_style{FontFace}">~;
		}
	}
	return "[BIBLE=$orig] $b:$c [/BIBLE]";
}
Lemme know of any problem..

Edit: there are some bugs, I'll fix them when I get back...
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#150775 - 11/11/02 09:57 AM Re: [6.3x] Smarter Looking Quotes and Codes [Finished]
Tama-chan Offline
Junior Member

Registered: 01/09/02
Posts: 5
Thanks CaCoffin, that's perfect! laugh

Top
#150776 - 11/12/02 08:15 AM Re: [6.3x] Smarter Looking Quotes and Codes [Finished]
DTM85 Offline
Junior Member

Registered: 06/09/02
Posts: 28
Wow...a newbie coding guide no, huh? laugh

I didn't understand a thing, could someone explain me, clearly, slowly and with a lot of patience? I want these quote and code boxes, with the "quote" word surrounded by another color (like this one in ubbdev wink ).

I installed a lot of hacks on my ubb, but I didn't understand a thing with this code! eek

What files have I to modify? Where and WHAT codes have I to insert? I have UBB.classic 6.2.1.

Thanks a lot smile

Top
#150777 - 11/12/02 02:39 PM Re: [6.3x] Smarter Looking Quotes and Codes [Finished]
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
Go to your Control Panel, choose "Style Settings", choose your style template and in "Header Insert" portion, paste the code in this thread's first post smile
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#150778 - 11/12/02 02:57 PM Re: [6.3x] Smarter Looking Quotes and Codes [Finished]
DTM85 Offline
Junior Member

Registered: 06/09/02
Posts: 28
Quote:
quote:
Originally posted by LK:
Go to your Control Panel, choose "Style Settings", choose your style template and in "Header Insert" portion, paste the code in this thread's first post smile
Yep, I did it...but it's all white, no grey background on "quote" or "code"...

How can i do this?

Top
#150779 - 11/12/02 05:35 PM Re: [6.3x] Smarter Looking Quotes and Codes [Finished]
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
ubb_lib.cgi, where you see "$vars_wordlets{ubbcode_quote}:", replace it with "<span class="small">$vars_wordlets{ubbcode_quote}:</span>"
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#150780 - 11/13/02 07:03 AM Re: [6.3x] Smarter Looking Quotes and Codes [Finished]
DTM85 Offline
Junior Member

Registered: 06/09/02
Posts: 28
Quote:
quote:</font><hr />Originally posted by LK:
ubb_lib.cgi, where you see "$vars_wordlets{ubbcode_quote}:", replace it with "<span class="small">$vars_wordlets{ubbcode_quote}:</span>"<hr /></blockquote>I tried your code, but there is a bug: </span>, not </span> wink

With "/ only" I obtained an error...ubb was unable to load. I added that inv.slash and it worked.

Here's my headerinsert code:

<blockquote><font class="small">code:
[qb]
Code:
<style type="text/css"> blockquote {  font-size: 9pt;  border: 1px solid #c3c3c3;  background: #f6f6f6;  color: black;  margin: 8px 20px;  padding: 0px 10px}blockquote .small {  background:#c3c3c3;  color: black;  margin-left:-10px;  padding:1px 2px}blockquote hr {  visibility:hidden;  height:1px}blockquote br {  font-size:10px}</style>
[/qb]
Tnx a lot LK!

Top
#150781 - 11/14/02 05:04 PM Re: [6.3x] Smarter Looking Quotes and Codes [Finished]
Felix 10 Offline
Enthusiast

Registered: 10/10/02
Posts: 391
Loc: Toronto
LK, I sent you a PM regarding these quotes, they just wont work for me. Can you read it and help me out?

Thank you

Top
Page 3 of 5 < 1 2 3 4 5 >


Who's Online
1 Registered (AllenAyres), 39 Guests and 6 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Team UBBDev Rides Again!
by AllenAyres
10/13/08 01:36 PM
Blogs, love em or hate em?
by AllenAyres
10/07/08 02:05 PM
What do you use to edit the files
by Ian_W
10/05/08 03:33 PM
BeyondCompare v3.00
by Ian_W
10/05/08 03:32 PM
Glossy Black Theme with Image Reflection
by Gizmo
10/05/08 02:17 PM
ShareThis
by Gizmo
09/28/08 05:06 AM
[7.3] Viewing MySQL logfiles made easier
by AllenAyres
09/27/08 09:57 PM
New Mods
[7.3] Viewing MySQL logfiles made easier
by blaaskaak
09/24/08 05:39 PM
[7.3.1] add search to showmembers page
by blaaskaak
09/07/08 04:50 AM
Multiple Identity Detector
by
12/30/06 06:39 PM
Newest Members
Kevs, pisa666, ghengis317, NitroX, Dogan
13346 Registered Users
Top Posters Last 30 Days
AllenAyres 9
blaaskaak 7
Chris Bale 4
FREAK1 4
Ian_W 4
tackaberry 4
Mike L_dup1 4

 

 

 
fusionbb message board php hacks