• OzzModz is no longer taking registrations. All registrations are being redirected to Snog's Site
    All addons and support is available there now.

HTML Not Parsing properly in PM's

HM666

New member
Whenever an ad is removed and the add-on sends an automatic PM to the user that its been removed there is a HTML parsing problem I think. Here is what I get via PM when my ad is removed.

View attachment 1053

I looked at the settings and did not see anything right off that stands out as a potential issue to cause this. I also looked to see if there was a phrase to change or anything in the templates and did not find anything.

Thanks,
Len
 
Might get faster service Len, if you tag Ozzy in your posts - I think that beeps his phone.
[MENTION=1]Ozzy47[/MENTION]
 
I have not looked into this mod in over a year. It had issues from day one from when I took it over.
 
I have not looked into this mod in over a year. It had issues from day one from when I took it over.

Hmmmm ok I'll have a look at the template and see if I can take out the HTML formatting in these PM's all together. There is really no reason that it HAS to have the colors etc. when its sent to a member.
 
Apparently this is from the PM Templates within the mod. This is the code that is creating he parsing problem:

Code:
Type: {adtype}

But I cannot find that or anything to reference it anywhere in the templates at all. I suspect that its hard coded into one of the PHP files. Any idea where?

EDIT: I have looked in the functions.php file and found where the color was indicated but it seems that its set to show using the same code throughout the mod. The problem is when I remove the code for the color the areas where that font uses that color are not displaying properly. There are a few instances of the color code in functions.php. I have narrowed it down to this code but my PHP is limited, I changed the font code in the html to span to test. Anyone have any ideas?

PHP:
// Get Ad Type Name
function getAdTypeName($adtype)
{
    global $db, $vbulletin, $vbphrase, $vboptions;
    if (!$adtype)
    {
        return '';
    }
    $adtypename = '';
	if ($adtype == 1)
	{
		$adtypename = '<span style="color:'.$vbulletin->options["classifieds_forsale_color"].'">'.$vbphrase["classifieds_forsale"].'</span>';
	}
	if ($adtype == 2)
	{
		$adtypename = '<span style="color:'.$vbulletin->options["classifieds_wanted_color"].'">'.$vbphrase["classifieds_wanted"].'</span>';
	}
	if ($adtype == 3)
	{
		$adtypename = '<span style="color:'.$vbulletin->options["classifieds_fortrade_color"].'">'.$vbphrase["classifieds_fortrade"].'</span>';
	}
	if ($adtype == 4)
	{
		$adtypename = '<span style="color:'.$vbulletin->options["classifieds_freeoffer_color"].'">'.$vbphrase["classifieds_freeoffer"].'</span>';
	}
    return $adtypename;
}
 
Last edited:
Back
Top