Welcome
We've been working hard

Describes how to prevent PbootCms from automatically extracting pictures from articles as thumbnails

PbootCms is a content management system based on PHP, which is used to quickly build websites. It has the function of automatically extracting the first picture in an article as a thumbnail, but sometimes this function is not applicable to all situations. This article will introduce how to prevent PbootCms from automatically extracting pictures in articles as thumbnails.

  1. Open IDE tools, such as VScode or Sublime.
  2. Use "When there is no thumbnail" as the keyword to search the entire project, and you can find two files with three codes.
  3. Open the searched code location and modify it in the following code section:
     //When there is no thumbnail, automatically extract the first image of the article as a thumbnail if (!  ico && preg_match('/<img\s+.*? src=\s? [\'|\"](.*?(\.gif|\.jpg|\.png|\.jpeg))[\'|\"].*? [\/]?>/ i', decode_string(content), srcs) && isset(srcs[1])) { $ico = $srcs[1]; }
  4. Comment out the three lines of code beginning with if in the above code, that is, add a double slash (//) at the beginning of the three lines.
  5. After all three comments are made, save the modified file.
  6. In this way, the function of PbootCms to automatically extract pictures from articles as thumbnails is successfully disabled.

summary

This article introduces how to prevent PbootCms from automatically extracting pictures in articles as thumbnails, so that you can better control the display effect of thumbnails. It should be noted that the original file must be backed up before modifying the code to avoid unexpected errors. I hope this article is helpful to you.

Like( zero ) Reward
Do not reprint without permission: New Start Blog » Describes how to prevent PbootCms from automatically extracting pictures from articles as thumbnails


Follow the public account "New Start Software Steward"

Get the latest network resources and cracking software!
Play with all kinds of software

Reward the author of the article if you think it is useful

Thank you very much for your reward, we will continue to give more high-quality content, let's create a better online world together!

Scan Alipay and reward

Scan WeChat and reward