TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 355
  • Total: 355

telling me there is a new version whenr there isn't

Started by sibling chris, June 09, 2009, 12:34:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sibling chris

as per topic thread title

I'm already running tp 1.0 beta 4 (1083) on smf 1.1.9

I'm getting a message when I try and save a block and the block end up not being saved :(

Quote
An update is available!

--------------------------------------------------------------------------------
New TP version available: TP v1.0 beta4 (1083)



Check new modules or just browse the available packages for TP, please visit the package servers page in SMF.
If you don't have TP server in your list of package servers, be sure to add one with this adress: http://www.tinyportal.net/tpmods


Only thing I changed recently was to add a custom Tpwireless.template.php file to my phobos theme folder

and also I've been tweaking my htaccess file to block spammers


can anyone tell me why this happening?


sibling chris


weirdly this just stopped happening and now I'm getting HTTP 406 errors when trying to save the php block :(

ZarPrime

chris,

Please Read and Reply to the Posting Guidelines

Also, please post the code you are trying to put into a php block so that one of our coders can check it for errors.

Finally ...
Click Here !!!

ZarPrime

sibling chris


Link to my site: test site and don;t want to give admin access
SMF version: 1.1.9
TP version: TP 1.0 beta 4 (1083)
Theme name and version: Phobos 114
Browser Name and Version: IE8 and FF3
Mods installed: 

Aeva ~ Auto-Embed Video & Audio 6.9.99   
Enhanced Calendar 1.1   
Custom Profile Field Mod 3.20   
Hide Info Center From Guests 1.0   
reCAPTCHA for SMF 0.9.5.4a   
Redirect on Login and/or Logout mod 0.3   
SMF Media Gallery 1.5.6   
SMF 1.0.17 / 1.1.9 / 2.0 RC1 Update 1.0   
SMF 1.0.17 / 1.1.9 / 2.0 RC1 Update 1.0   
SMG Slideshow Addon 1.0   
Spoiler Tag 0.6a   
Stop Spammer 2.2   
TinyPortal 1.083   
TinyPortal 1.075 
Twitter Field 1.0   
VisualWarning 1.42   
Yarex 2 smiley set 2.0.0.1   
Highslide Image Viewer 1.2   

Car Avatar Pack V1.0 1.0   
LightB smiley set 1.1   
Sci-Fi Avatars 1.0   
star wars avatars 1.0


Related Error messages: none


the php block I am using works 100% OK, I only was trying to tweak a single parameter when this occured. If I edit the code directly in the database there are no problems encountered while executing the code.

I have managed to track it down to some ECHO statements and the 406 occurs when trying to echo out a PHP variable of some description or fuction return value

posting this code works

echo '<script type="text/javascript" src=""></script>';


posting either of the following does not work and results in HTTP 406

echo '<script type="text/javascript" src="' . mgal_theme_url('swfobject.js') . '"></script>';



echo $settings['default_theme_url'];



I don;t think posting the entire php block is relevant

ZarPrime

Quote from: sibling chris on June 09, 2009, 11:02:25 AM
I don;t think posting the entire php block is relevant

chris,

Unfortunately, there is no way for one of our coders to debug your code if you refuse to post it.  In this case, you will have to fix the problem yourself.  If this is what you would like to do, would you like me to mark this topic solved?

ZarPrime

sibling chris

hey ther's no need to get so arsey about it! ;) ;)

...I just said I didn't think it was relevant given what I've already looked into and described

Here it is


global $sourcedir, $boarddir, $user_info, $ID_MEMBER, $context, $txt, $galurl, $galurl2, $scripturl, $settings, $db_prefix;

// load SMG components
require_once($sourcedir . '/Subs-MGallery.php');
loadMGal_Settings();
if(loadlanguage('MGallery') == false) loadLanguage('MGallery', 'english');

// default settings that can be changed
$scrollerFolder = $boarddir . '/Themes/default/mgallery';
$scrollerItemsFileName = 'imageScrollerItems.xml';
$scrollerItemsFile = $scrollerFolder . '/' . $scrollerItemsFileName;
$scrollerMaxItems = 20;
$scrollerHeight = 160;
$scrollerWidth = 800;


// insert client side javascript code to display the image scroller
// all 'addVariable' items can be amended to suit

if ( 0 != filesize( $scrollerItemsFile ) ) {
   
echo '
<script type="text/javascript" src="' . mgal_theme_url('swfobject.js') . '"></script>
<div style="text-align:center;">
<div id="my_scroller" style="background-color:#606060; width:100%; height: ' . $scrollerHeight . 'px;margin-left:auto;margin-right:auto;">
Your browser is not able to run this Flash script.<br /><br />
Requirements: <br />
   - JavaScript must be enabled<br />
   - You must have Flash installed<br />

<script language="javascript" type="text/javascript">
/* <![CDATA[ */
var so = new SWFObject("' . mgal_theme_url('scroller_x.swf') . '", "my_scroller", "800", "' . ($scrollerHeight - 5) . '", "6");

so.addVariable("sourceFile", "' . mgal_theme_url($scrollerItemsFileName) . '");
so.addVariable("fileType", "XML");
so.addVariable("stageWidth", 800);
so.addVariable("stageHeight", "' . ($scrollerHeight - 5) . '");
so.addVariable("maxNumItems", "' . $scrollerMaxItems . '");

// changeable options
so.addVariable("thumbSize", "120");
//so.addVariable("randomize", "no");
so.addVariable("scrollSpeed", "2");
so.addVariable("bgColor", "606060");
so.addVariable("thumbAlign", "both");
so.addVariable("navColor", "5b503a");
so.addVariable("arrowColor", "ffffaa");
so.addVariable("captionSize", "12");
so.addVariable("captionColor", "ffa807");
so.addVariable("captionAlign", "center");
so.addVariable("thumbPadding", "10");
so.addVariable("thumbPaddingTop", "0");
so.addVariable("thumbPaddingBottom", "2");
so.addVariable("thumbBackgroundColor", "606060");
so.addVariable("thumbBackgroundOpacity", "100");
//so.addVariable("jsClickHandler", "my_custom_onclick_function");
so.addVariable("autoScroll", "yes");
so.addVariable("autoScrollSpeed", "2");
so.addVariable("autoScrollPause", "2000");
so.addVariable("smoothLoad", "yes");
so.addVariable("initFadeInSpeed", "1");
so.addVariable("initFadeInItemPause", "500");

so.write("my_scroller");
/* ]]> */
</script>
</div>
</div>
';

}




when I set SecFilterEngine off this posts OK, but obviosuly thats not a permanent solution

as I mentioend before the code executes wihtout errors and does what its supposed to

thanks again
chris


sibling chris

My web host is telling me that despite the fact I managed to post this in the first instance that it should have always been blocked by their mod_security configuration

The only option I Think I have therefore is to switch it off in htaccess for this specifc page

I am assuming therefore that this is not a TP or SMF application issue per say.

Can someone tell me do I have to do this for a specific TP php file or will I have to apply it for index.php?

Switching off mod_security for index.php bothers me, but should it?

Cheers all


IchBin

Many hosts run without mod_security. You don't HAVE to turn it off if you install TP manually.

This website is proudly hosted on Crocweb Cloud Website Hosting.