Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev
Reply
  #21  
Old 6th January 2016, 11:15
kOni kOni is offline
Senior Member
 
Join Date: Apr 2012
P2P
Posts: 17
Default
Quote:
Originally Posted by fireknight View Post
Even altering the css, won't help much to be honest.
I think kOni you are using 08 source code.

Lets take a look at the functions.

Code:
function stderr($heading, $text)
{
  stdhead();
  stdmsg($heading, $text);
  stdfoot();
  die;
}
The standard error is calling on the standard message function

Code:
function stdmsg($heading, $text)
{
  print("<table class=main width=750 border=0 cellpadding=0 cellspacing=0><tr><td class=embedded>\n");
  if ($heading)
    print("<h2>$heading</h2>\n");
  print("<table width=100% border=1 cellspacing=0 cellpadding=10><tr><td class=text>\n");
  print($text . "</td></tr></table></td></tr></table>\n");
}
The table surrounding the $text ( or in this case an image ).
Has been hard coded to include a border of 1px.
So no matter what you change in the css, the hard coding will over rule the css.

You would be better of creating 2 new functions to cater for image error messages.
Then alter the setting to go with the images.

Example
Code:
function std_img_err($heading, $text)
{
  stdhead();
  std_img_msg($heading, $text);
  stdfoot();
  die;
}

function std_img_msg($heading, $text)
{
  print("<table class=main width=750 align=center border=0 cellpadding=0 cellspacing=0><tr><td class=embedded align=center border=0>\n");
  if ($heading)
    print("<h2>$heading</h2>\n");
  print("<table width=100% align=center border=0 cellspacing=0 cellpadding=10><tr><td class=text align=center border=0>\n");
  print($text . "</td></tr></table></td></tr></table>\n");
}
Then where you want to use the images for stderr("", "<img src='pic/error.png' width='100%'>");

You would use something like this instead std_img_err("", "<img src='pic/error.png' width='100%'>");

I hope this will be of some help to you.

There are other ways of doing it, you could create new classes of tables and td.
Then create new css styles to go with the new classes.


Thanks fireknight...
Reply With Quote
Reply

Tags
error , msg

Thread Tools

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 +2. The time now is 10:51. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.