This modification is to solve the problem that the page is not beautiful when the logo address of the friendly website is invalid. When the image address fails, a fork will be displayed, which will affect the appearance of the page. The following modifications can solve this problem and display a new picture you set.
It was modified with the help of isolatedfly. I only know the code, but I am not familiar with the structure of PJblog. I asked Alonefly to know that in addition to modifying bloglink.asp, I also need to modify class/cls_control.asp. The modification is very simple:
1. First prepare a 88*31 logo as a new picture when the link image fails. Assume that the file is err.gif and put it in the images directory
2. Modify bloglink.asp
turn up
The code copy is as follows:
ImgLink=ImgLink&"<ahref="""&blog_Links("link_URL")&"""target=""_blank""><imgsrc="""&blog_Links("link_Image")&"""alt="""&blog_Links("link_Name")&"""border=""0""style=""margin:3px;width:88px;height:31px""/></a>"
Replace with
The code copy is as follows:
ImgLink=ImgLink&"<ahref="""&blog_Links("link_URL")&"""target=""_blank""><imgsrc="""&blog_Links("link_Image")&"""onerror=""src='images/err.gif'""alt="""&blog_Links("link_Name")&"""border=""0""style=""margin:3px;width:88px;height:31px"""/></a>"
Modify class/cls_control.asp
turn up
The code copy is as follows:
ImgLink=ImgLink&"<ahref="""&blog_Links("link_URL")&"""target=""_blank""><imgsrc="""&blog_Links
("link_Image")&"""alt="""&blog_Links("link_Name")&""border=""0""style=""margin:3px;width:88px;height:31px""/></a>
Replace with
The code copy is as follows:
ImgLink=ImgLink&"<ahref="""&blog_Links("link_URL")&"""target=""_blank""><imgsrc="""&blog_Links
("link_Image")&"""alt="""&blog_Links("link_Name")&""border=""0""style=""margin:3px;width:88px;height:31px""
oneError=""src='images/err.gif'""/></a>
3. Then enter the background friendly link management and edit it casually