vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   ShoutBOX would be nice. (https://vborg.vbsupport.ru/showthread.php?t=83413)

nkt 06-20-2005 03:56 AM

ShoutBOX would be nice.
 
Simple one. No multi/l33t/edit permissions features. Just for registered users, only on forumhome, regular shoutbox that uses forum smilies.
:nervous:

Damn, wrong forum :(

Sco 06-20-2005 11:38 AM

Yeah, thats what im looking for.

Colin F 06-20-2005 01:20 PM

moved.

Jenta 06-21-2005 02:11 AM

Quote:

Originally Posted by nkt
Simple one. No multi/l33t/edit permissions features. Just for registered users, only on forumhome, regular shoutbox that uses forum smilies.

exactly.....something really simple

taffy056 06-21-2005 04:38 AM

Hi,

This is a nice shoutbox by GeekyDesigns, it would be great if someone does it for vBulletin 3.50

https://vborg.vbsupport.ru/showthread.php?t=68861

taffy

Jenta 06-21-2005 10:34 AM

I would prefer something that just checked (if bbuserid) (include bb code parsing file) to allow smiles and URLs and bam post a shout!
Modify the forum home template with an iframe to show the shouts and your done.

It's only a shout and geeky's is nice if you want ultimate control over shouts but something really, really simple would be nicer IMO.

Unfortunately, I don't have the experience or I would probably spit one out in 10 minutes. :)

Jenta 06-24-2005 12:56 AM

I have started to attempt to do this with my limited knowledge. I realize this looks more like 3.0 code. No problem converting it once the basics are in place.
I get it to insert the correct values into the database.

I just need to figure out how to get it displayed now :nervous:

If anyone wants to chime in...


CREATE TABLE QUERY
[sql]
CREATE TABLE `shouts` (
`shoutid` bigint(255) unsigned NOT NULL auto_increment,
`shout` text,
`username` varchar(50) default '0',
PRIMARY KEY (`shoutid`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
[/sql]



SHOUTBOX.PHP
PHP Code:

<?php

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS'1);
define('THIS_SCRIPT''shoutbox');


// ################### PRE-CACHE TEMPLATES AND DATA ######################
// pre-cache templates used by all actions
$globaltemplates = array(
    
'shoutbox'
);

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');


// ########################### START ADD SHOUT ############################
if ($_POST['do'] == "addshout") {

        
$DB_site->query("INSERT INTO shouts (shoutid, shout, username) VALUES (NULL, '$_POST[shout]', '$bbuserinfo[username]')");
}





eval(
'print_output("' fetch_template('shoutbox') . '");'); 

?>

FORM ON FORUM HOME
HTML Code:

<form action="shoutbox.php" method="post">
<input type="hidden" name="do" value="addshout" />
<input type="text" name="shout" value="" size="60"  />
<input type="submit" class="button" value="Shout!" />
</form>


IFRAME SOURCE ON FORUMHOME
HTML Code:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title><phrase 1="$vboptions[bbtitle]">$vbphrase[x_powered_by_vbulletin]</phrase> ShoutBox IFrame</title>
<META HTTP-EQUIV="Refresh" CONTENT="90; URL=shoutbox.php?">


$headinclude


<style type="text/css">
<!--
body {
margin: 0px 0px 0px 0px;
background-color: #F5F5FF;
}
//-->

</style>

</head>
<body>
<table border="0" width="100%" align="center" class="alt1">
<tr>
        <td class="alt1" width="100%">
                <span class="smallfont">SHOUTS WOULD GO HERE</span>
        </td>
</tr>
</table>
</body>
</html>


Marco van Herwaarden 06-24-2005 06:44 AM

You should at least protect the INSERT statement against SQL-Insertions. The current code is a huge security risk.

Jenta 06-24-2005 07:00 AM

Quote:

Originally Posted by MarcoH64
You should at least protect the INSERT statement against SQL-Insertions. The current code is a huge security risk.

I only wish i knew how :/

----------------------------------------------------
I got this to pull shouts...
PHP Code:

$latestshouts "SELECT * FROM shouts ORDER BY id DESC LIMIT 20"

now I know theres a while loop that needs to go after that
will probably give up at this point :(

Guest190829 06-24-2005 10:28 AM

PHP Code:

while($result$db->fetch_array($varname))
{
 
//stuff here


^^ that should work correct me if I'm wrong...

Look here on how to ensure security Here

Roxie 07-05-2005 04:07 PM

I'm looking for this also. :)

noppid 10-14-2005 11:17 PM

I whipped up a really simple Quick ShoutBox based on a forum. It's a hidden forum, well almost, I just don't show it, it's accessable. New threads are off, html is off, image code is off. BBcodes are on and so are smilies. There is only one thread. All posting permissions are handled by standard vB stuff. Display uses the security model from showpost. We have it set to only display the last shout.

The last post in that thread is the shout.

It's one template edit and one plugin for forumhome complete. It has one fast indexed query.

We're testing it now. If it seems useful, I will post it.

Quick ShoutBox Demo.


All times are GMT. The time now is 08:19 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01119 seconds
  • Memory Usage 1,757KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_html_printable
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (12)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete