Jump to content

sql or php problem


njnorcliffe

Recommended Posts

Hello Everyone,

 

First off i must point out that I am a noob when it comes to most of the coding and building of websites. I generally find things on the internet and glue them together. I am pretty unsure of alot of the terminology etc so if i have named things incorrectly I'm sorry in advance.

 

I have found some code on the internet to create a database table that will allow me to create a news ticker, it is being integrated into a phpbb3 Forum.

 

The code has been altered for my needs and integrated already into the phpbb3 installation and works perfectly except I'm struggling to make it allow me to input more than 255 characters.

 

I am pretty sure it is in the line of code below and the "  'text:25:100'  " part, I can not for the life of me find the correct string to replace in the  "  'text:25:100'  " bit, which I am assuming should be something on the lines of a MEDIUMTEXT or MEDIUMBLOB, I believe the code was written for mysql 4.1  It however is running on a 5.2.6 version of php.

 

Any help you may give me in helping me figure this out will be greatly appreciated.

 

'scores_ticker' => array('lang' => 'SCORES_TICKER',    'validate' => 'string',    'type' => 'text:25:100', 'explain' => false),

 

 

Should you require any more information i will try to provide it the best i can.

 

 

Regards

 

Nigel

Link to comment
Share on other sites

Thanks for your swift response, and correction of where the post should have been,

 

 

Below the line below is what I have done to each file (part of phpbb3 ) and the database table creation, I hope this is the correct information requested.

 

You can see that it works on this page http://www.nethertonjfc.com/test/ Just the lack of a decent amount of characters is stopping it being useful lol.

 


 

 

//MYSQL

 

INSERT INTO njfc_phpbb3_config (config_name, config_value) VALUES('scores_ticker', 'This is the Results and Scores Ticker.');

INSERT INTO njfc_phpbb3_config (config_name, config_value) VALUES('forum_color', 'FFFFFF');

 

 

//includes/acp/acp_board.php

 

//Scores Ticker Mod

'scores_ticker' => array('lang' => 'SCORES_TICKER',    'validate' => 'string',    'type' => 'text:25:100', 'explain' => false),

'forum_color' => array('lang' => 'FORUM_COLOR',    'validate' => 'string',    'type' => 'text:6:6', 'explain' => false), 

//End Scores Ticker Mod

 

//includes/functions.php

 

// Scores Ticker Mod

'SCORES_TICKER' => $config['scores_ticker'],

'FORUM_COLOR' => $config['forum_color'],

//End Scores Ticker Mod

 

 

//language/en/common.php

 

'SCORES_TICKER' => 'Scores Ticker',

'FORUM_COLOR' => 'Scores Ticker Color (Hex)',

 

 

 

//HTML for page ticker is going on

 

<marquee behavior="scroll" direction="left" width="100%" scrollamount="3">

<font color="#{FORUM_COLOR}">{SCORES_TICKER} &nbsp</font>

 

Link to comment
Share on other sites

Yes the field type in the database is varchar255, because it is part of the phpbb3 software i don't want to change it,

 

I now see this is causing the problem, I will have to figure out how to make a new entry in the database  and call it a different name i suppose, and then figure out how to integrate it into the phpbb3 software.

 

Thanks for your help, i may be back if i cant figure out how to make my own entry into the database lol.

 

Thanks Again

 

Nigel

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.