Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - NoBob

Pages: [1] 2 3
1
Discussion & Troubleshooting / UNEXPECTED T-STRING error resolved
« on: June 21, 2003, 02:04:29 PM »
That's clever! It works. Thank you.

Used "Nice's old port" in the category description and it comes up on the public page as "Nice's old port", with no error message.
When you go back to Edit Categories, though, you have to remember to put in ' again, otherwise you'll get another error. It also seems to have an adverse effect on css no text decoration script on the page. Best to have a separate style sheet uploaded.

http://www.rtwtravel.com/gallery/

Thanks. But you're right, it still doesn't solve the underlying problem.

Best, NoBob

2
Discussion & Troubleshooting / UNEXPECTED T-STRING error resolved
« on: June 19, 2003, 05:59:15 PM »
bump

3
Discussion & Troubleshooting / UNEXPECTED T-STRING error resolved
« on: June 18, 2003, 07:00:12 PM »
Good, good, good, we're halfway there...In categories.php, I made the changes to cat_description and now I can use an apostrophe in the description. But htmlspecialchars has always been there after cat_name, and I still get an error if I use an apostrophe in the category name. How's that work for you JoePCFX? You were having problems with descriptions.

Code now:
"cat_name" => htmlspecialchars($cat_cache[$cat_id]['cat_name']),
  "cat_description" => htmlspecialchars($cat_cache[$cat_id]['cat_description']),

NoBob.

4
Discussion & Troubleshooting / UNEXPECTED T-STRING error resolved
« on: June 18, 2003, 12:53:50 PM »
I tried replacing the single quotes around {cat_name} and {cat_description} with doubles, but that just generated error messages too. Anyway to re-write it?

NoBob

5
Discussion & Troubleshooting / UNEXPECTED T-STRING error resolved
« on: June 18, 2003, 12:01:57 PM »
Does it matter that there are a mix of single and double quotes in 4bare's categories.html template?

<?php
 $cl = '{clickstream}';
 $uti = "{url_top_images}";
 $lti = "{lang_top_images}";
 $uni = "{url_new_images}";
 $lni = "{lang_new_images}";
 require "{template_url}/incl/click_incl.php";
 ?>
 <table width="100%" border="0" cellspacing="0" cellpadding="0">

<?php
$cn = '{cat_name}';
$cd = '{cat_description}';
$ch = '{cat_hits}';
require "{template_url}/incl/cat_incl.php";


NoBob

6
Discussion & Troubleshooting / UNEXPECTED T-STRING error resolved
« on: June 17, 2003, 10:51:00 PM »
There must be a solution.

NoBob.

7
Discussion & Troubleshooting / UNEXPECTED T-STRING error resolved
« on: June 17, 2003, 10:16:09 PM »
Just tried the default template and everything works okay.

I get these errors when using 4bare.

"Nice's old port" as category name. Error on home page:
Parse error: parse error, unexpected T_STRING in /usr/local/psa/home/vhosts/rtwtravel.com/httpdocs/gallery/includes/template.php(133) : eval()'d code on line 208


"Nice's old port" is in the description. When arrive at the category page through clickstream from home page, this is the error:
Parse error: parse error, unexpected T_STRING in /usr/local/psa/home/vhosts/rtwtravel.com/httpdocs/gallery/includes/template.php(133) : eval()'d code on line 95

When the apostrphe is in both the category name and the description, the error is:
Parse error: parse error, unexpected T_STRING in /usr/local/psa/home/vhosts/rtwtravel.com/httpdocs/gallery/includes/template.php(133) : eval()'d code on line 208

NoBob.

8
Discussion & Troubleshooting / UNEXPECTED T-STRING error resolved
« on: June 17, 2003, 07:24:21 AM »
V@no,

I've got

magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off

NoBob.

9
Discussion & Troubleshooting / UNEXPECTED T-STRING error resolved
« on: June 16, 2003, 05:32:53 PM »
I've reached a dead end here. I was hoping that someone in the know would see something in the code we've posted. It seems like we're now the only ones interested in solving this problem.

NoBob.

10
Discussion & Troubleshooting / UNEXPECTED T-STRING error resolved
« on: June 14, 2003, 09:30:41 AM »
Just to check, the wrong code is in the html file that's being passed to template.php?

I see this
 $site_template->register_vars(array(
  "categories" => get_categories($cat_id),
  "cat_name" => htmlspecialchars($cat_cache[$cat_id]['cat_name']),
  "cat_description" => $cat_cache[$cat_id]['cat_description'],

in categories.php.

Anyone who wrote this gallery have any more ideas?

NoBob.
words&pictures

11
Discussion & Troubleshooting / UNEXPECTED T-STRING error resolved
« on: June 14, 2003, 12:42:56 AM »
Well,

The error I got mentions this code, which starts at line 133 in includes/template.php:  

   eval($code);
    }
    else {
      $code = preg_replace("/<\[\?|%](php|=)+( \r\n)*(.*)[\?|%]>/siU", "", $template);
      echo $code;
    }
  }

  function exec_php_code($code) {
    $code = str_replace('\\', '\\\\', $code);
    $code = str_replace('\'', '\\\'', $code);
    $new_lines = array();
    $is_code = 0;
    $lines = explode("\n", $code);
    foreach ($lines as $line) {
      //$line = trim($line);
      if (preg_match('/<[\?|%](php|=)+/', $line, $regs)) {
        $line = preg_replace('/<[\?|%](php|=)?/i', '', $line);
        $line = ((!empty($regs[1]) && $regs[1] == "=") ? "echo " : "").$line;
        $is_code = 1;
      }
      if ($is_code) {
        $line = str_replace ('\\\'', '\'', $line);
        $line = str_replace ('\\\\', '\\', $line);
        if (preg_match('/[\?|%]>/', $line)) {
          $line = preg_replace('/[\?|%]>/', '', $line);
          $is_code = 0;
        }
      }
      else {
        $line = 'echo \''.$line.'\'."\\n";';
      }
      $new_lines[] = $line;
    }
    return implode("\n", $new_lines);
  }

  function clean_template($template) {
    $search_array = array(
      "/".$this->start."[^ \t\r\n".$this->end."]+".$this->end."/",
      "/".$this->start."if[ \t\r\n]+[^ \t\r\n".$this->end."]+".$this->end."/",
      "/".$this->start."endif[ \t\r\n]+[^ \t\r\n".$this->end."]+".$this->end."/",
      "/&#36;([0-9])/",
      "/&#92;([0-9])/"
    );
    $replace_array = array(
      "",
      "",
      "",
      '$\1',
      '\\\1'
    );
    $template = preg_replace($search_array, $replace_array, $template);
    return $template;
  }

  function error($errmsg, $halt = 0) {
    if (!$this->no_error) {
      echo "<br /><font color='#FF0000'><b>Template Error</b></font>: ".$errmsg."<br />";
      if ($halt) {
        exit;
      }
    }
  }
} // end of class
?>

This is just semi-colons and curly brackets to me, but maybe someone can see something. I found htmlspecialchars in other php files, but it's not in this php file.

NoBob.

12
Mods & Plugins (Releases & Support) / ran into difficulty
« on: June 13, 2003, 09:24:41 PM »
Hi,

I want to replace the next and previous text links with arrow buttons. I followed the instructions to the letter, but the code in 4bare details.html is a bit different from what you put in the instructions:

{if next_image_name}{lang_next_image}<br />
<b><a href="{next_image_url}">{next_image_name}</a></b>
<!-- <br /><br /><a href="{next_image_url}"><img src="{next_thumb_file}" border="1"></a> -->
{endif next_image_name}

I put this code:

{if next_image_url}<a href="{next_image_url}">{endif next_image_url}
<img src="http://www.rtwtravel.com/gallery/templates/4bare/images/image_next.gif" border="0" alt="="{next_image_name}">
{if next_image_url}</a>{endif next_image_url}</

Don't know where the link for the image_next_off button (a transparent gif) goes. Help, please. Also the arrow is not in the middle of the table, as it replaces the text "next image". What do I do to correct that, please?

Best, NoBob.

13
Discussion & Troubleshooting / UNEXPECTED T-STRING error resolved
« on: June 13, 2003, 06:32:52 PM »
Me too. 4bare.

NoBob.
words&pictures

14
Discussion & Troubleshooting / UNEXPECTED T-STRING error resolved
« on: June 13, 2003, 06:04:55 PM »
Oops. But tried that too now. On the public page it just says "didn&apos;t do it".

I'm putting this in the Edit categories section, where it says "Description
HTML allowed." I'm changing this in the right place, yeah?

Best, NoBob.

words&pictures

15
Discussion & Troubleshooting / UNEXPECTED T-STRING error resolved
« on: June 13, 2003, 05:29:17 PM »
Don't get it. If I put &apos, for example, "didn&apost do it", then it appears as just that on the public page. Sorry, I've missed something I think. Could you explain, please?

Best, NoBob.
words&pictures

Pages: [1] 2 3