[BETA] Scripturise Post Text

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
belcalan
Registered User
Posts: 9
Joined: Tue Jun 17, 2003 3:53 am
Contact:

Post by belcalan »

AbelaJohnB wrote: Update on this getting coverted over to use BBCode?

Sorry, I've been kinda bogged down in The Real World (TM) and I haven't had a lot of time to look at this. I've got some holidays coming up soon so hopefully I can get back into it then.

Also I would appreciate anyone pointing me in the direction of a good starter for writing BBcode mods. I'm not sure where to start.

Glenn
"Religion and science are opposed...but only in the same sense as that in which my thumb and forefinger are opposed - and between the two, one can grasp anything" - Sir William Bragg.

Jesus-inside
Registered User
Posts: 64
Joined: Thu Jul 24, 2003 10:19 pm

Post by Jesus-inside »

I tried the mod and it doesn't work, And I don't know why.

belcalan
Registered User
Posts: 9
Joined: Tue Jun 17, 2003 3:53 am
Contact:

Post by belcalan »

Jesus-inside wrote: I tried the mod and it doesn't work, And I don't know why.

Check in the code and make sure that the spelling is all 'scripturise' not 'scripturize' for the function names. I thought I updated the files, but it's best to check.

Is it doing anything or is it just acting as if the mod wasn't installed?

Glenn
"Religion and science are opposed...but only in the same sense as that in which my thumb and forefinger are opposed - and between the two, one can grasp anything" - Sir William Bragg.

Jesus-inside
Registered User
Posts: 64
Joined: Thu Jul 24, 2003 10:19 pm

Post by Jesus-inside »

Acting like it wasn't installed. I copyed and pasted everything from those instructions you posted and that .php.txt file.

Jesus-inside
Registered User
Posts: 64
Joined: Thu Jul 24, 2003 10:19 pm

Post by Jesus-inside »

belcalan wrote: I opened up bbcode.php & I'm a bit lost :oops:

Glenn



Open up other bb code mods learn how they did it and maybe base it offf that.

Cross_+_Flame
Registered User
Posts: 295
Joined: Wed Oct 30, 2002 3:37 pm
Location: Okie-homa!
Contact:

Post by Cross_+_Flame »

Ha! Looks like all us Christian board admins are swarming over to this one... :D

I would double the suggestion to check out other BBCode makers and see how they did it. I would highly suggest maybe talking to CodeMonkeyX as he is creating an Acronym mod that uses BBCode.

LINK: Acronym Mod - phpbb

He has a good head on his shoulders and viewing his beta mod or perhaps talking to him directly would be a good idea. Learning in tandem with another programmer is probably more fruitful for both of you than a Padawan learner relationship... :wink:

Jesus-inside
Registered User
Posts: 64
Joined: Thu Jul 24, 2003 10:19 pm

Post by Jesus-inside »

Good Idea. Well. If you need help post in this thread.

Jesus-inside
Registered User
Posts: 64
Joined: Thu Jul 24, 2003 10:19 pm

Post by Jesus-inside »

What verson of phpbb will this work on?

Jesus-inside
Registered User
Posts: 64
Joined: Thu Jul 24, 2003 10:19 pm

works now

Post by Jesus-inside »

works now. I'm an idiot.

Jesus-inside
Registered User
Posts: 64
Joined: Thu Jul 24, 2003 10:19 pm

Post by Jesus-inside »

Edit stuff moved

Jesus-inside
Registered User
Posts: 64
Joined: Thu Jul 24, 2003 10:19 pm

Post by Jesus-inside »

Hello? Any one home? Come on are you making the bb code mod or not? :D :P :?:

Cross_+_Flame
Registered User
Posts: 295
Joined: Wed Oct 30, 2002 3:37 pm
Location: Okie-homa!
Contact:

Post by Cross_+_Flame »

Well, I'm leery of posting code I made out in the open before I submit it to the mod database, but I would like belcalan's blessing as a secondary author and others critique it before submission. I didn't actually use belcalan's code or the website it keys to, but hey, we're all working on this together, right? ;)

We're all Christians here, so I trust there will be no ripping-off of my hard work. ;)

Code: Select all

############################################################## 
## MOD Title: Bible Passages BBCode 
## MOD Author: Cross_+_Flame < admin@crossandflame.com > (n/a) http://www.crossandflame.com/forum 
## MOD Author, Secondary: belcalan < belcalan@yahoo.com.au > (Glenn) http://glenn.bluemountains.net.au
## MOD Description: Adds a new bbcode.  Allows you put make references to the Bible in your posts
## 	   	    to be searched for in bible.crosswalk.com's bible database.  Syntax is:
##		    [bible]Scripture Verse to be searched for[/bible]
## MOD Version: 1.0.0
## 
## Installation Level: (Easy) 
## Installation Time: 10 Minutes
## Files To Edit: - posting.php
##                - includes/bbcode.php,
##                - langugage/lang_english/lang_main.php,
##                - templates/subSilver/bbcode.tpl,
##                - templates/subSilver/posting_body.tpl
## Included Files: n/a
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
############################################################## 
## Author Notes: 
## 		  You must have Multiple BBCode MOD installed for this to work.
##        	  Get it here: http://www.phpbb.com/phpBB/viewtopic.php?t=74705
##
##      	  The scripture passage can be a run of verses (ex. John 1:1-3) or a single verse
##		  (ex. John 1:1) or a chapter (ex. John 1).  If you shorten the passage, please use 
## 		  standard abbreviations (ex. Jn 1:1).
##
##		  This mod was based off of wGEric's excellent "Google Search BBCode" mod found here:
##		  http://www.phpbb.com/phpBB/viewtopic.php?t=123139.  Bless you wGEric!
############################################################## 
## MOD History: 
##
##   2003-08-08 - Version 1.0.0 
##      	    - Initial Release
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

#
#-----[ OPEN ]---------------------------------
#
posting.php

#
#-----[ FIND ]---------------------------------
#
$EMBB_keys = array(''

#
#-----[ IN-LINE FIND ]---------------------------------
#
 array(''

#
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
,'x'

#
#-----[ FIND ]---------------------------------
#
$EMBB_widths = array(''

#
#-----[ IN-LINE FIND ]---------------------------------
#
 array(''

#
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
,'40'

#
#-----[ FIND ]---------------------------------
#
$EMBB_values = array(''

#
#-----[ IN-LINE FIND ]---------------------------------
#
$EMBB_values = array(''

#
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
,'Bible'

#
#-----[ FIND ]---------------------------------
#
# NOTE: the full line to look for is:
#	'L_BBCODE_F_HELP' => $lang['bbcode_f_help'],
#
	'L_BBCODE_F_HELP' =>

#
#-----[ AFTER, ADD ]--------------------------------
#

	'L_BBCODE_X_HELP' => $lang['bbcode_x_help'],
#
#-----[ OPEN ]------------------------------------------
#
includes/bbcode.php

#
#-----[ FIND ]------------------------------------------
#
	$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);
#
#-----[ AFTER, ADD ]------------------------------------------
#

  $bbcode_tpl['bible'] = '\'' . $bbcode_tpl['bible'] . '\'';
  $bbcode_tpl['bible'] = str_replace('{STRING}', "' . str_replace('\\\"', '\"', '\\1') . '", $bbcode_tpl['bible']);
  $bbcode_tpl['bible'] = str_replace('{QUERY}', "' . urlencode(str_replace('\\\"', '\"', '\\1')) . '", $bbcode_tpl['bible']);
#
#-----[ FIND ]------------------------------------------
#
	$replacements[] = $bbcode_tpl['email'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
	
	// [bible]bible passage to search for[/bible] code..
	$patterns[] = "#\[bible\](.*?)\[/bible\]#ise";
	$replacements[] = $bbcode_tpl['bible'];
#
#-----[ OPEN ]---------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]---------------------------------
#
# NOTE: the full line to look for is:
#$lang['bbcode_f_help'] = "Font size: [size=x-small]small text[/size]";
#
$lang['bbcode_f_help'] =

#
#-----[ AFTER, ADD ]---------------------------------
#

$lang['bbcode_x_help'] = "Bible: [bible]Bible passage to search for[/bible] (alt+x)";

#
#-----[ OPEN ]------------------------------------------ 
#
templates/subSilver/bbcode.tpl
    
#
#-----[ FIND ]------------------------------------------ 
#
<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</A><!-- END email -->
#
#-----[ AFTER, ADD ]------------------------------------------ 
#

<!-- BEGIN bible --><a href="http://bible.crosswalk.com/OnlineStudyBible/bible.cgi?word={QUERY}&version=nrs" target="_blank">{STRING}</a><!-- END bible -->

#
#-----[ OPEN ]---------------------------------
#
templates/subSilver/posting_body.tpl

#
#-----[ FIND ]---------------------------------
#
# NOTE: the full line to look for is:
#f_help = "{L_BBCODE_F_HELP}";
#
f_help =

#
#-----[ AFTER, ADD ]---------------------------------
#
x_help = "{L_BBCODE_X_HELP}";

#
#-----[ FIND ]---------------------------------
#
# NOTE: the actual line contains all the bbcode tags, but it begins with the below text
#
bbtags = new Array(

#
#-----[ IN-LINE FIND ]---------------------------------
#
'[url]','[/url]'

#
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
,'[bible]','[/bible]'

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
#
# EoM
The only reservation I have is that you can only search in one bible version. I chose the New Revised Standard Edition as that is the most reflective of my faith tradition and I saw it as a neutral choice, as the NIV is not offered on CrossWalk. Regardless of that, it is a simple button on CrossWalk's site to press to change the version. Plus, advanced users can change the code in bbcode.tpl to default search in another version.

For example,

Code: Select all

 &version=nrs > New Revised Standard
&version=nas > New American Standard
&version=asv > American Standard Version
&version=nkj > New King James Version
&version=kjv > King James Version
&version=msg > The Message
&version=nlt > New Living Translation
&version=rsv > Revised Standard Version
Whaddya think? Again, it was a good couple hours modding to get it down pat, so please respect the work I put into it, and the inspiration belcalan gave me to do it.

Jesus-inside
Registered User
Posts: 64
Joined: Thu Jul 24, 2003 10:19 pm

Post by Jesus-inside »

so I trust there will be no ripping-off of my hard work.
It looks like a ripped verson of the google mod. Ok me going to try.

Jesus-inside
Registered User
Posts: 64
Joined: Thu Jul 24, 2003 10:19 pm

Post by Jesus-inside »

Wait... I have the other mod installed. So then it'll come link up ever time i post lol!

Cross_+_Flame
Registered User
Posts: 295
Joined: Wed Oct 30, 2002 3:37 pm
Location: Okie-homa!
Contact:

Post by Cross_+_Flame »

Jesus-inside wrote:
so I trust there will be no ripping-off of my hard work.
It looks like a ripped verson of the google mod. Ok me going to try.


Correct. Hence why this is in the code:

Code: Select all

##        This mod was based off of wGEric's excellent "Google Search BBCode" mod found here: 
##        http://www.phpbb.com/phpBB/viewtopic.php?t=123139.  Bless you wGEric!
;)

Post Reply

Return to “[2.0.x] MODs in Development”