Release Notes

Added liking for market posts

  • Sir,
    I am using this plugin. As per instruction, I added categories in the language file, but changes are not being reflated. I have made many attempts to trouble shoot the problem, but unable to pin point. Honestly the language file is confusing to me, and this why I am not sure if I have added the categories in the correct line / place. 

    It would be very kind of you if you can preciously tell me at what line or reference points the categories should be added. 

    For your review I have uploaded the en.php in file with visibility permission as Public. The BOLD TEXT Areas are where I have added the categories. Could you kindly take a look at it and let me know or comment  what I have done wrong and the correct way?

    The file link is https://www.myhotfb.com/file/view/1361/language-file-for-market

  • Looks good for me. Flush the caches including OP Cache and reload webpage.

  • @RvR thanks for the feedback. I have flushed and flushed and just made sure no cache but the categories doesn't show up. It does if I put the categories through the front interface. Did you had a time to look at the language file link https://www.myhotfb.com/file/view/1361/language-file-for-market 

  • Flush the caches including OP Cache

    Clean ALL caches (incl. memcached, Cloudflare cache etc).

    You can delete system_cache and views_simplecache folders in your data directory manually also.

    All works OK. So your issue is related with cache only.

  • Dear @RvR (RvR),

    I have spent countless hours to correctly place the categories in the language file but it is not working. I am not sure what am I suppose to be looking for? How it is suppose to look when you correctly place the categories in the language file?  I also want to know when there is a front end interface for adding categories and other categories for market condition why do I have to edit the language file? 

    Anyways, I have declared the following categories in the lang, but they don't show up unless, I manually add them through the front end interface. Please notice the Bold Items are added in lang manually, The Bold Italic Categories were in the lang by default and they show up correctly and i have notice it is because under  /mod/market/views/default/filters/market:

    I see 3 files: 1. all.php, 2. category.php, 3. edit.php
    in all.php file market:settings:type - the Bold Italics (All ads, Buying Selling, Swap, Free) are declared. 

    Do I also need to declare the market categories (bold items) and market conditions (bold items) here?

    	// Settings
    	'market:settings:status' => "Status",
    	'market:settings:desc' => "Description",
    	'market:max:posts' => "Max. number of market posts pr. user",
    	'market:unlimited' => "Unlimited",
    	'market:currency' => "Currency (৳, $, €, DKK or something)",
    	'market:allowhtml' => "Allow HTML in market posts",
    	'market:numchars' => "Max. number of characters in market post (only valid without HTML)",
    	'market:pmbutton' => "Enable private message button",
    	'market:location:field' => "Enable a location field",
    	'market:adminonly' => "Only admin can create market posts",
    	'market:comments' => "Allow comments",
    	'market:custom' => "Custom field",
    	'market:settings:type' => 'Enable market post types (buy/sell/swap/free)',	
    	'market:type:all' => "All ads",
    	'market:type:buy' => "Buying",
    	'market:type:sell' => "Selling",
    	'market:type:swap' => "Swap",
    	'market:type:free' => "Free",
    	'market:expire' => "Auto delete market posts older than",
    	'market:expire:month' => "month",
    	'market:expire:months' => "months",
    	'market:expire:subject' => "Your market post has expired",
    	'market:expire:body' => "Hi %s
    
    Your market post '%s' you created %s, has been deleted.
    
    This happens automatically when market post are older than %s month(s).",
    
    	// market categories
    	'market:categories' => 'Market categories',
    	'market:categories:choose' => 'Choose category',
    	'market:categories:settings' => 'Market Categories:Adverts',	
    	'market:categories:explanation' => 'Set some predefined categories for posting to the market.<br>Categories could be "Adverts, B2B, Service Listings etc...", seperate each category with commas - remember not to use special characters in categories and put them in your language files as market:category:<i>categoryname</i>',	
    	'market:categories:save:success' => 'Site market categories were successfully saved.',
    	'market:categories:settings:categories' => 'Market Categories',
    	'market:category:all' => "All",
    	'market:category' => "Category",
    	'market:category:title' => "Category: %s",
    
    	// Categories
    	'market:category:adverts' => "Adverts",
    	'market:category:b2b' => "B2B",
    	'market:category:bikroy' => "Bikroy.COM",
    	'market:category:servicelistings' => "Service Listings",
    	'market:category:MyHoTFB' => "MyHoTFB.COM",
    	'market:category:trending' => "Trending",
    	'market:category:designersitem' => "Designer's Item",
        
    	// Custom select
    	'market:custom:select' => "Item condition",
    	'market:custom:text' => "Condition",
    	'market:custom:activate' => "Enable Custom Select:",
    	'market:custom:settings' => "Custom Select Choices",
    	'market:custom:choices' => "Set some predefined choices for the custom select dropdown box.<br>Choices could be \"market:custom:new,market:custom:used...etc\", seperate each choice with commas - remember to put them in your language files",
    
    	// Custom choises
    	 'market:custom:na' => "No information",
    	 'market:custom:new' => "New",
    	 'market:custom:unused' => "Unused",
    	 'market:custom:used' => "Used",
    	 'market:custom:good' => "Good",
    	 'market:custom:excellent' => "Excellent",
    	 'market:custom:fair' => "Fair",
    	 'market:custom:poor' => "Poor",
    	 'market:custom:refurbished' => "Refurbished",
    	 'market:custom:trending' => "Trending",
    );

    As far as caches are concerned, everything is just disabled. everything. 

    As, I have now added the market categories through front end, they show up as followings on the right side of Activity page in between Header Market categories  & Latest comments​

    Latest comments

    Kindly please advise what am I doing wrong? why should I put these in the lang when u have made a front end interface for adding cats.  Would you be interested to take a look? I can give u Elgg Admin UN and PW including Server :Login Credentials. Kindly please help. Please. 

  • Did you flush your cache and run an upgrade?

  • @MyHoTFB.COM

    Firstly, it was not my idea to use the language file for settings.

    In the new version (under development yet), I changed these settings already.

    Currently I don't want to support the old version of the plugin.
    However, the existing version works fine including the categories.

    The logic for adding names for categories:

    1 - Set the categories name in lowercase and separate with commas in the plugin's settings page. E.g.:

    adverts, b2b, bikroy, servicelistings, myhotfb

    2 - Save the changes.

    3 - Open language file and add these strings:

    'market:category:adverts' => "Adverts",
    'market:category:b2b' => "B2B",
    'market:category:bikroy' => "Bikroy.COM",
    'market:category:servicelistings' => "Service Listings",
    'market:category:myhotfb' => "MyHoTFB.COM",

    Where, Adverts is a name of category showing on the site.

    3 - Flush the caches, run upgrade etc

    Ideally if the Market plugin is located below all other plugins.

    You don't need to edit other files.

    Keep in your mind, you shouldn't use special characters in the categories names also.

Nikolai Shcherbin

Founder, CEO, Product Manager, Lead Developer at Platform for Social Apps :: https://wzm.me :: Elgg on Telegram https://t.me/elggnews

Stats

  • Category: eCommerce
  • License: GNU General Public License (GPL) version 2
  • Updated: 2024-1-2
  • Downloads: 3415
  • Recommendations: 8

Other Projects

View Nikolai Shcherbin's plugins