Loading


Advertisement:

Recent Posts

Pages: [1] 2 3 ... 10
1
General help / Bulk Location (Cities) Adding
« Last post by MarkT on Today at 01:20:10 am »
I need to add multiple new cities at the same time (in bulk).
Osclass currently allows us to add only 1 city at a time by going to Settings->Locations.

I  have over 10 000 cities to add and doing them 1 by 1 is just not an option.

Is there a way I can do this?

I've tried this suggestion but it gives an error https://forums.osclass.org/development/bulk-add-cities-region-country/msg128704/#msg128704.

I'm using Osclass 3.7.3
2
General help / Re: region maps seting
« Last post by BritWeb on Today at 12:28:15 am »
Can you make it bit clearer? What theme and where you are making such change, etc.

Regards
3
3.7.x / Re: I'm getting php notices in my log files
« Last post by Web-Media on Today at 12:20:01 am »
How and where do you use the function ?
Not the function itself is the problem , but the way is used .
4
General help / region maps seting
« Last post by alexandruhritcuz on July 22, 2017, 05:02:27 pm »
Hello

I have a small problem and i understand how it work.

In map seting, i selected all region, saved, after 3 hours has been disabled.
Does anyone know why and how can I solve the problem?

Thanks
5
dev101. Thank you.
I'll do those mods. I don't intend on changing bender theme whith another theme.
6
Hi, you can see here what changes were required to actually do opposite of what you want (add 4th dimension), you can do the reverse to completely remove preview size, even from the admin side:

https://github.com/osclass/Osclass/pull/2080/files

Sure, you don't need to change admin settings etc. and you can modify preview helper function to return thumbnail instead (for compatibility with other themes and plugins).
7
Plugins / Re: HybridAuth Plugin
« Last post by _Carlison on July 22, 2017, 01:59:23 pm »
Hi Guys,

If you are facing problem with hybridauth plugin . so you can buy "Social Connect" plugin from Osclass Market. This is very usefull plugin.

Thanks
8
There are two more lines on ItemActions.php below that block:

1.- osc_copy($tmpName.'_preview', $folder.$resourceId.'_preview.'.$extension);

2.- @unlink($tmpName."_preview");

Regarding regeneration of images, the process is different (oc-admin/controller/settings/media.php, case('images_post')).

Anyway, as said, previews might be required by some theme you'd want to install in the future, unless you're really tight on hard disk space I wouldn't go for these core modifications.

Regards
9
3.7.x / I'm getting php notices in my log files
« Last post by marius-ciclistu on July 22, 2017, 10:30:58 am »
PHP Notice:  Undefined index: fk_i_category_id in /oc-includes/osclass/helpers/hDefines.php on line 487
PHP Notice:  Undefined index: pk_i_id in /oc-includes/osclass/helpers/hDefines.php on line 493
PHP Notice:  Undefined index: s_city in /oc-includes/osclass/helpers/hDefines.php on line 494
PHP Notice:  Undefined index: s_title in /oc-includes/osclass/helpers/hDefines.php on line 495

How to define them?

Code: [Select]
    /**
     * Create item url from item data without exported to view.
     *
     * @since 3.3
     * @param array $item
     * @param string $locale
     * @return string
     */
    function osc_item_url_from_item($item, $locale = '')
    {
        if ( osc_rewrite_enabled() ) {
            $url = osc_get_preference('rewrite_item_url');
            if( preg_match('|{CATEGORIES}|', $url) ) {
                $sanitized_categories = array();
487:                $cat = Category::newInstance()->hierarchy($item['fk_i_category_id']);
                for ($i = (count($cat)); $i > 0; $i--) {
                    $sanitized_categories[] = $cat[$i - 1]['s_slug'];
                }
                $url = str_replace('{CATEGORIES}', implode("/", $sanitized_categories), $url);
            }
493            $url = str_replace('{ITEM_ID}', osc_sanitizeString($item['pk_i_id']), $url);
494            $url = str_replace('{ITEM_CITY}', osc_sanitizeString($item['s_city']), $url);
495            $url = str_replace('{ITEM_TITLE}', osc_sanitizeString($item['s_title']), $url);
            $url = str_replace('?', '', $url);
            if($locale!='') {
                $path = osc_base_url().$locale."/".$url;
            } else {
                $path = osc_base_url().$url;
            }
        } else {
            $path = osc_item_url_ns($item['pk_i_id'], $locale);
        }
        return $path;
    }
10
Hi,

Those are created in the core (oc-includes/osclass/ItemActions.php, public function uploadItemResources). I've seen a few themes making use of them, many others don't.

Regards

Thank you Teseo. So in Bender's regard, those pictures can be made verry small so that they don't use space, but they are using inodes if they remain there, even if they are 1x1px small.

Would it be ok If we commend/remove this section?

Code: [Select]
                            // Create preview
                            $path = $tmpName."_preview";
                            $size = explode('x', osc_preview_dimensions());
                            ImageResizer::fromFile($normal_path)->resizeTo($size[0], $size[1])->saveToFile($path, $extension);

Then what will happen in the case of a regenerate images call from admin area? The preview images will not be renewed/modified, or there is another place where the preview images regeneration should be commented/removed from the code?
Pages: [1] 2 3 ... 10