SMFHacks.com

SMF Classifieds => Support => Topic started by: Brad on June 10, 2010, 04:11:26 pm

Title: Auto Board Posting
Post by: Brad on June 10, 2010, 04:11:26 pm
I dig this feature, but is there a way I can change it to where it puts "Auction:" before the subject in the subject line?

I looked around in the code, but couldnt find a quick answer to where this code was that creates the new post so i figured i'd ask.
Title: Re: Auto Board Posting
Post by: SMFHacks on June 10, 2010, 04:19:11 pm
The text itself is store in themes/default/language/classifieds.english.php

If you were are looking for the code then it is in either Sources/Classifieds.php or Sources/Classifieds2.php depending on your SMF version.

Look for the function called Classifieds_CreateAutoPost and that is the code that does the posting.
Title: Re: Auto Board Posting
Post by: Brad on June 10, 2010, 04:39:34 pm
So, I assume this is the line I edit:

From classifieds.php
Code: [Select]
'subject' => $row['title'],
I added this line to classifieds.english.php

Code: [Select]
$txt['class_posting_presubject'] = 'Auction: ';
so how do I add the 'class_posting_presubject' to the line so it works with the $row['title'] ?

I am still learning how PHP works. thanks for the help
Title: Re: Auto Board Posting
Post by: SMFHacks on June 10, 2010, 04:44:57 pm
Change
Code: [Select]
'subject' => $row['title'],
To
Code: [Select]
'subject' => $txt['class_posting_presubject']  . $row['title'],

Title: Re: Auto Board Posting
Post by: Brad on June 10, 2010, 04:47:40 pm
that worked. Thanks!