[RC] Classifieds MOD 2.0.0

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
demon201984
Registered User
Posts: 1
Joined: Wed Jan 23, 2013 7:51 pm

Re: [RC] Classifieds MOD 1.2.0

Post by demon201984 »

I'm sorry for the very bad English.
On my forum is Advertisement Management installed and sometimes I have the error when go from forum to the Classifieds MOD.
For example: I have sometimes the error when go from page http://www.site.ru/index.php to the page http://www.site.ru/buysell/index.php :

Fatal error: Call to a member function assign_vars() on a non-object in Z:\home\сайт.ru\www\ads\functions.php on line 67

Code: Select all

	if (sizeof($ads))
	{
		foreach ($ads as $position_id => $code)
		{
			$template->assign_vars(array(   //on the line with the №67 is  this code
				'ADS_' . $position_id		=> $code,
			));
		}
	}
I have this error on localhost and on my site.
Сan you help me?
jaidinho
Registered User
Posts: 3
Joined: Mon Oct 15, 2012 4:20 pm

Re: [RC] Classifieds MOD 1.2.0

Post by jaidinho »

Hi, am I being a numpty or does the "mandatory thumbnail" feature no longer exist?

I found in this thread Kamahl posted that the feature had been added but this was for an older version of the mod -->
"- - added settings to ACP - set Phone number field and Thumbnail field as mandatory"

I see the phone number option, but not one for thumbnails/images.


If no longer, does anyone know how I can modify the files to force an image & thumbnail to be mandatory(/required)?

I can do the html templates/language files just pasting in the <span class="mandatory"....
Very grateful for any responses! Thanks!
sareptile
Registered User
Posts: 1
Joined: Mon Feb 04, 2013 6:56 am

Re: [RC] Classifieds MOD 1.2.0

Post by sareptile »

Hi Kamahl19, maybe it's there but I'm not seeing it. Does the latest version of the classifieds mod support a seller rating system? Something along the lines of what they have on Ebay for example? Folks on my board are asking me to set up a subforum where they can announce or denounce traders and I don't want to do this.
kutt
Registered User
Posts: 35
Joined: Thu Oct 15, 2009 7:22 am
Contact:

Re: [RC] Classifieds MOD 1.2.0

Post by kutt »

I run the v1.2.0 and have not seen a seller rating system
http://mz-forum.com
... always keep things updated!
User avatar
Kamahl19
Registered User
Posts: 1598
Joined: Tue Nov 06, 2007 3:33 pm
Location: Slovakia
Name: Martin
Contact:

Re: [RC] Classifieds MOD 1.2.0

Post by Kamahl19 »

No there is no user rating system.

If you want I can customize it for you, write me an email if you are interested.
Johnnie Walker
Registered User
Posts: 10
Joined: Tue Feb 05, 2013 5:21 pm
Location: São Paulo - Brazil
Name: Joao Thomeo
Contact:

Re: [RC] Classifieds MOD 1.2.0

Post by Johnnie Walker »

Hi. I've installed this MOD and found it to be very interesting and useful.

Some points I think should be improved, are:
1- The anouncer is always reffered as a seller, even if he creates a buying or trading ad. I've treated this copying the language file to my language, and editing the text.

2- It would be very nice if the classifieds banner could appear in board3 portal and viewtopic, so it can attract more people to list their products. I've tried to add the code there, but they don't show up.

Thank's for this nice piece of work.
Last edited by Johnnie Walker on Thu Feb 14, 2013 12:48 pm, edited 1 time in total.
Johnnie Walker - Keep Walking
www.triumphonline.com.br
Half of my money I've spent with motorcycles, women and drinks. The other half, I've spent badly.
gt500
Registered User
Posts: 143
Joined: Thu Jun 12, 2008 11:35 am

Re: [RC] Classifieds MOD 1.2.0

Post by gt500 »

hi

i have just installed this mod, everything seems to have went fine but when i click the classfied link i get the following error

You are not authorised to access this area.

i have checked my settings and the classfieds are enabled, not sure what else to do any sugestions as i can access everything else

Thanks
gt
User avatar
Kamahl19
Registered User
Posts: 1598
Joined: Tue Nov 06, 2007 3:33 pm
Location: Slovakia
Name: Martin
Contact:

Re: [RC] Classifieds MOD 1.2.0

Post by Kamahl19 »

You did not set permissions to view Classifieds.
Johnnie Walker
Registered User
Posts: 10
Joined: Tue Feb 05, 2013 5:21 pm
Location: São Paulo - Brazil
Name: Joao Thomeo
Contact:

Re: [RC] Classifieds MOD 1.2.0

Post by Johnnie Walker »

Any tips on how to display the random ads or recent ads on all pages?

Another tip, I think would be nice if we could hava an option like the default thumbnail be generated from the first image. I've seen that users has some difficulties to read the instructions, and click on the "T". This way, the smart users can choose the thumbnail, and the others wil have it set based on the first image,

Something I've noticed, Users can uploads images that has spaces in the file name, but when generating thumbnails, it doesn't display correctly.
Johnnie Walker - Keep Walking
www.triumphonline.com.br
Half of my money I've spent with motorcycles, women and drinks. The other half, I've spent badly.
User avatar
Kamahl19
Registered User
Posts: 1598
Joined: Tue Nov 06, 2007 3:33 pm
Location: Slovakia
Name: Martin
Contact:

Re: [RC] Classifieds MOD 1.2.0

Post by Kamahl19 »

You need to put the code to functions.php instead of index.php
Johnnie Walker
Registered User
Posts: 10
Joined: Tue Feb 05, 2013 5:21 pm
Location: São Paulo - Brazil
Name: Joao Thomeo
Contact:

Re: [RC] Classifieds MOD 1.2.0

Post by Johnnie Walker »

When I remove the code from index.php, and add to functions.php it displays the banner on all pages, but I get an error message when try to open the classifieds page:

Code: Select all

Fatal error: Cannot redeclare resize_img() (previously declared in /forum/buysell/includes/functions_buysell.php:20) in /forum/buysell/includes/functions_buysell.php on line 84
Solved. Thanks!!!

I've opened "includes/functions.php"

FIND:

Code: Select all

    include($phpbb_root_path . CL_DIRECTORY . '/includes/functions_buysell.' . $phpEx);
REPLACE:

Code: Select all

if (!function_exists('resize_img'))
{
    include($phpbb_root_path . CL_DIRECTORY . '/includes/functions_buysell.' . $phpEx);
}
Johnnie Walker - Keep Walking
www.triumphonline.com.br
Half of my money I've spent with motorcycles, women and drinks. The other half, I've spent badly.
User avatar
Kamahl19
Registered User
Posts: 1598
Joined: Tue Nov 06, 2007 3:33 pm
Location: Slovakia
Name: Martin
Contact:

Re: [RC] Classifieds MOD 1.2.0

Post by Kamahl19 »

I am glad you solved it :)
Johnnie Walker
Registered User
Posts: 10
Joined: Tue Feb 05, 2013 5:21 pm
Location: São Paulo - Brazil
Name: Joao Thomeo
Contact:

Re: [RC] Classifieds MOD 1.2.0

Post by Johnnie Walker »

To help other, that's what I've done:

First, I've removed the mod code from index.php

REMOVE FROM INDEX.PHP

Code: Select all

// MOD :: CLASSIFIEDS MOD -- START
if (isset($config['enable_classifieds']))
{
  if($config['enable_classifieds'] && $auth->acl_get('u_view_classifieds') && ( ($config['display_ads_on_index'] && $config['ad_num_display_on_index'] !='0') || ($config['display_rand_ads_on_index'] && $config['rand_ad_num_display_on_index'] !='0') ) )
  {
    include($phpbb_root_path . CL_DIRECTORY . '/includes/functions_buysell.' . $phpEx);
    $user->setup('mods/classified');
  
    if ($config['display_ads_on_index'])
    {
      display_recent_ads($config['ad_num_display_on_index']);
  
      $template->assign_vars(array(
        'S_DISPLAY_ADS_ON_INDEX'	=> true,
        'S_RECENT_ADS_TOP'	=> ($config['recent_ads_place']) ? true : false,
      ));
    }
  
    if ($config['display_rand_ads_on_index'] )
    {
      display_random_ads($config['rand_ad_num_display_on_index']);
  
      $template->assign_vars(array(
        'S_DISPLAY_RAND_ADS_ON_INDEX'	=> true,
        'S_RAND_ADS_TOP'	=> ($config['rand_ads_place']) ? true : false,
      ));
    }
  }
}
// MOD :: CLASSIFIEDS MOD -- END
After that, I've editted includes/functions.php

FOUND

Code: Select all

	$user->add_lang('mods/portal');
ADDED AFTER

Code: Select all

// MOD :: CLASSIFIEDS MOD -- START
if (isset($config['enable_classifieds']))
{
  if($config['enable_classifieds'] && $auth->acl_get('u_view_classifieds') && ( ($config['display_ads_on_index'] && $config['ad_num_display_on_index'] !='0') || ($config['display_rand_ads_on_index'] && $config['rand_ad_num_display_on_index'] !='0') ) )
  {
if (!function_exists('resize_img'))
{
    include($phpbb_root_path . CL_DIRECTORY . '/includes/functions_buysell.' . $phpEx);
}    
    $user->setup('mods/classified');
  
    if ($config['display_ads_on_index'])
    {
      display_recent_ads($config['ad_num_display_on_index']);
  
      $template->assign_vars(array(
        'S_DISPLAY_ADS_ON_INDEX'	=> true,
        'S_RECENT_ADS_TOP'	=> ($config['recent_ads_place']) ? true : false,
      ));
    }
  
    if ($config['display_rand_ads_on_index'] )
    {
      display_random_ads($config['rand_ad_num_display_on_index']);
  
      $template->assign_vars(array(
        'S_DISPLAY_RAND_ADS_ON_INDEX'	=> true,
        'S_RAND_ADS_TOP'	=> ($config['rand_ads_place']) ? true : false,
      ));
    }
  }
}
// MOD :: CLASSIFIEDS MOD -- END
Inside this block of code, there is this entry "resize_img". This is because I have this mod installed, and was getting errors because of this. It does no harm if you don't has this mod, keeping it on code.

Then, to add the code to topic pages:

Edit /styles/prosilver/template/viewtopic_body.html

FIND

Code: Select all

<!-- INCLUDE overall_header.html -->
ADD AFTER

Code: Select all

<!-- ENDIF -->

<!-- IF S_DISPLAY_ADS_ON_INDEX and S_RECENT_ADS_TOP -->
  <!-- INCLUDE classifieds_recent_ads_block.html -->
<!-- ENDIF -->

<!-- IF S_DISPLAY_RAND_ADS_ON_INDEX and S_RAND_ADS_TOP -->
  <!-- INCLUDE classifieds_random_ads_block.html -->
<!-- ENDIF -->
FIND

Code: Select all

<!-- INCLUDE overall_footer.html -->
ADD BEFORE

Code: Select all

<!-- IF S_DISPLAY_ADS_ON_INDEX and not S_RECENT_ADS_TOP -->
  <!-- INCLUDE classifieds_recent_ads_block.html -->
<!-- ENDIF -->

<!-- IF S_DISPLAY_RAND_ADS_ON_INDEX and not S_RAND_ADS_TOP -->
  <!-- INCLUDE classifieds_random_ads_block.html -->
<!-- ENDIF -->
Finally, to add to the board3 portal:

Edit the file styles/prosilver/template/portal/portal_body.html

FIND

Code: Select all

<!-- INCLUDE overall_header.html -->
ADD AFTER

Code: Select all

<!-- IF S_DISPLAY_ADS_ON_INDEX and S_RECENT_ADS_TOP -->
  <!-- INCLUDE classifieds_recent_ads_block.html -->
<!-- ENDIF -->

<!-- IF S_DISPLAY_RAND_ADS_ON_INDEX and S_RAND_ADS_TOP -->
  <!-- INCLUDE classifieds_random_ads_block.html -->
<!-- ENDIF -->

FIND

Code: Select all

<!--// board3 Portal by www.board3.de //-->
ADD BEFORE

Code: Select all

<!-- IF S_DISPLAY_ADS_ON_INDEX and not S_RECENT_ADS_TOP -->
  <!-- INCLUDE classifieds_recent_ads_block.html -->
<!-- ENDIF -->

<!-- IF S_DISPLAY_RAND_ADS_ON_INDEX and not S_RAND_ADS_TOP -->
  <!-- INCLUDE classifieds_random_ads_block.html -->
<!-- ENDIF -->
If you want the ads to be seen by guests at board3 portal, you have to add permission to guest group to see ads, at ACP.
Johnnie Walker - Keep Walking
www.triumphonline.com.br
Half of my money I've spent with motorcycles, women and drinks. The other half, I've spent badly.
Johnnie Walker
Registered User
Posts: 10
Joined: Tue Feb 05, 2013 5:21 pm
Location: São Paulo - Brazil
Name: Joao Thomeo
Contact:

Re: [RC] Classifieds MOD 1.2.0

Post by Johnnie Walker »

I'm facing a little problem now. I have 11 items listed, but some appears twice at classifieds page.

I've made a select at the classified tables, and there are only 11 lines.

Any ideas?
Johnnie Walker - Keep Walking
www.triumphonline.com.br
Half of my money I've spent with motorcycles, women and drinks. The other half, I've spent badly.
Johnnie Walker
Registered User
Posts: 10
Joined: Tue Feb 05, 2013 5:21 pm
Location: São Paulo - Brazil
Name: Joao Thomeo
Contact:

Re: [RC] Classifieds MOD 1.2.0

Post by Johnnie Walker »

I've found now that it only happens if recent ads block on index is selected at ACP.
Johnnie Walker - Keep Walking
www.triumphonline.com.br
Half of my money I've spent with motorcycles, women and drinks. The other half, I've spent badly.
Locked

Return to “[3.0.x] Abandoned MODs”