Jump to content

mitov

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mitov's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hiya, I need some help to change a text link to an image link. The following is the code snippet at the moment: $html .= '>'.$_MT_LANG->RECOMMEND ."</a>"; From what i understand, it's making the text located in the Language file linkable. Is it possible to change this code to make an image in the root folder of my site linkable instead of the text? I can supply the full code if needed. Thank you for help!
  2. worked perfectly! thank you very much!!!! (although i had to change the + to +?) Miro
  3. Hi everyone, This is my current code snippet: { function replaceImage( &$row, $autoresize, $maxchars, $width = 0, $height = 0 ) { global $database, $_MAMBOTS, $current_charset; $image = ""; $regex = "/\<img.+src\s*=\s*\"([^\"]*)\"[^\>]*\>/"; preg_match ($regex, $row->text, $matches); $images = (count($matches)) ? $matches : array(); if (count($images)) $image = $images[1]; if ($image) { if ($autoresize && function_exists('imagecreatetruecolor') && ($image1 = modJaSLWI::processImage ( $image, $width, $height ))) { $image = 'background:url('.JURI::base().$image1.') no-repeat;'; } else { $image = 'background:url('.JURI::base().$image.') no-repeat;'; } I need to make it only process images which have a number in the file name, for example demo2.jpg and not demo.jpg. I think editing the regex and/or the preg_match may do it? It's a wild guess... am i totally wrong? Thank in advance!
  4. Hiya everyone, I need some serius help. i have a php script which indexes my website. The problem is that it indexes EVERYTHING including unwanted things like my html menu. This means that when i search, it is displayed.... Have a look at [a href=\"http://hairandbeautypages.com/find/?query=hebe&type=advanced&searchType=2\" target=\"_blank\"]http://hairandbeautypages.com/find/?query=...ed&searchType=2[/a] (the first result). The file which controls the indexing is the class.index php file. In it, i have this: [code]// Has this page got any script tags?                     while(preg_match('%<script[^>]*>.*?</script>%is', $pageData, $ignore_matches)) {                         $pageData = str_replace($ignore_matches[0], '', $pageData);                     }                     unset($ignore_matches);                     [b]// Only grab the contents of the page body and then                     // strip out any script tags                     eregi("(<body[^>]*>.*</body>)", $pageData, $bodyArray); [/b]                     if (sizeof($bodyArray) > 0) {                         $strippedPageData = strip_tags($bodyArray[1]);                     } else {                         $strippedPageData = '';                     }                     unset($bodyArray);[/code] The bolded is what i think i need to change. I tried adding <spider></spider> tags to my page, and changed body to spider in the script, but it still dosent work. Any help will be gratley appreciated! Any ides on how i can get the script to index the contant between the <spider></spider> tags only? THANK YOU VERY MUCH FOR ALL YOUR HELP!
×
×
  • 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.