Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 11-06-2001, 07:31 PM
stretch stretch is offline
 
Join Date: Nov 2001
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi

I recently found a company offering a free sms service that I integrated into my Vbulletin board.

www.dogsonacid.com

The company that offers the free service is

www.fonetastic.com , I also found a sign up service for there partners page at http://dogsonacid.fonetastic.net/ once i had signed up. Go there first to sign up for an account.

This is a skinable SMS service so it looks just like part of my site.

It works in the following manner.

1) Go to postbit templates
2) Expand this and edit the template called postbit

There are 2 place that you can put this that looks quite nice. The first is text

1) Find this piece of code

<a href="report.php?s=$session[sessionhash]&postid=$post[postid]">Report
this post to a moderator</a>

and put this in front of it

<a href="http://dogsonacid.fonetastic.net/sms/v1/?msg=$post[message]">Sms This Message | </a>


2) This method is a graphic version.

before the code

<a href="editpost.php?s=$session[sessionhash]&action=editpost&postid=$post[postid]"><img src="images/edit.gif" border="0" alt="Edit/Delete Message"></a>

place this piece of code

<a href="http://dogsonacid.fonetastic.net/sms/v1/?msg=$post[message]"><img src="images/sms.gif" border="0" alt="Sms This Message"></a>

If you do this method you will need to upload it to the imagesfolder a file called sms.gif.


Note the http://dogsonacid.fonetastic.net/ url im posting is the once i got for signing up, you will need to replace this with code of your own.

Thats all you need to do and you can offer FREE SMS to your customers.

Oh I also added it to the header as a button.

Finally they seem like quite an approachable company as i was having problems with the <br /> in the messages and they modified the code there end to deal with it.

So check it out and let me know what you think.
Reply With Quote
  #2  
Old 11-06-2001, 08:28 PM
stretch stretch is offline
 
Join Date: Nov 2001
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi

Ok Quick update for people who have smiles / htm etc on the messages.

You need to open showthread.php and find the code (this is 2.2)

$counter=0;
while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) {
if ($postdone[$post[postid]]) {
$counter--;
continue;
} else {
$postdone[$post[postid]]=1;
}

below 2.2 find this code

$post[message]=bbcodeparse($post[pagetext],$forum[forumid],$post[allowsmilie]);

//highlight words for search engine
if (isset($highlight)) {
if ((isset($postid) and $postid==$post[postid]) or !isset($postid)) {
reset($replacewords);
while (list($key,$val)=each($replacewords)) {
$post['message']=preg_replace("/(^| |\n|\r|\t|\]|>|\")(".$val.")(([\.,]+[ $\n\r\t])|$|\"|<|\[| |\n|\r|\t)/si", "\\1<highlight>\\2</highlight>\\3", $post['message']);
}
}
}

and directly below put

//GET THE MESSAGE
$chrismessage = $post[pagetext];
//format out the tags
$chrismessage = strip_tags($chrismessage);
//replace vb code
$chrismessage = eregi_replace(".*):", "", $chrismessage);
//remove quote etc
$chrismessage = eregi_replace("\[(.*)\]", "", $chrismessage);
//remove dead space
$chrismessage = eregi_replace("[[:space:]]+", " ", $chrismessage);
//encode it
$chrismessage = urlencode($chrismessage);
//save it back
$post[chrismessage] = $chrismessage;
Oh yeah you need to update the template to say post[chrismessage] instead of post[message]

thatll do it.
Reply With Quote
Reply

Thread Tools
Display Modes

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 12:45 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.03351 seconds
  • Memory Usage 2,167KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (2)postbit
  • (2)postbit_onlinestatus
  • (2)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete