Support

Update user's photo ad-upload limit

This guide should help you update the number of possible images that a user can attach to their ad. By default, it's set to 6 which you can see on Step 1 of ad-posting process.

Attached is how it used to look like:

Below are 3 simple steps on updating these photo upload limit

1. Open /engine/pages/ad_step_2.php on your server. You can do so by connecting to your server via FTP or through CPANEL's Filemanager.

2. Find this code: for ($i = 1; $i <= 6; $i++), this code existed at least thrice on this page and you'd have to update the number 6 in the code to whatever "limit" you'd like to set.

/engine/pages/ad_step_2.php
for ($i = 1; $i <= 6; $i++)

on Line 70, Line 408 and Line 496.

3. You need to update your database to store records for the new photos you're adding. If you're reducing the number of photos that a user can upload, no need to worry about this Step, however, if you're increasing the number of photos a user can upload, you need to go to cl_ads table and add a new ROW corresponding to the total number of your max photo upload. Assuming you wanted to let the user upload upto 10 photos, then you change the number (as highlighted in the steps above from 6 to 10), and update the database by adding new column which should be photo_7, photo_8, photo_9 and photo_10. The easiest way is to go your PHPMyAdmin and just add new row and set the type to varchar, length to 100 and set collation to utf8_general_ci. Alternatively, you can run this query

Add this to the Database
ALTER TABLE  `cl_ads` 
ADD  `photo_7` VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
ADD  `photo_8` VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
ADD  `photo_9` VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
ADD  `photo_10` VARCHAR( 100 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL

Hope that helps.


Browse Space

- Pages
- News
- Labels
- Attachments
- Bookmarks
- Mail
- Advanced
- Activity

Explore Confluence

- Popular Labels
- Notation Guide

Your Account

Log In

 

Other Features

Add Content


Web Scribble makes job board software, classifieds software, and social network software.