Market plugin v1.10.2

Release Notes

Fixed some error reported by Vextah - thanks mate :)

Remember to test ;)

  • Tried to save an ad but nothing happens and there is no error. Kindly check

  • raymondraymond I am using this in both my Test site, and my live site. I am not encountering any issues aprt from an error when deleting a post. What ckeditor / mce are you using? Have you tried with all other third party plugins disabled?

  • Hello Slyhne,

    I've translated your plugin into French, do you have a github repo so i can propose it for integration ? 

    Or I can simply publish it here if you prefer ?

  • Hi Florian

    I have sent you a PM :-)

  • Great work thanks!   Any easy way to integrate on-line payment tools into the plugin? thanks again

  • Hi Slyhne, dis is one of my elgg's favourite plugins and can't let it go for elgg 2.x. Would there b an elgg 2.x version sooner? Thanks for d great plugin!

  • Work for Elgg 2? Anybody try?

  • Yes, it works fine on Elgg 2.0.1. Should also work on  other versions of 2.x.

  • When I display market item detail page on my mobile phone, main picture take up all space and the description is lined in a narrow column on the right site:

    (I dont know why I can not embed images but image is imgur: http://imgur.com/Zeo7CMH )

    How can I make image to display on top of description (not on left taking up all space)?

    Cheers

     

     

  • @Selen - what theme are you using?

    This is how it looks using the Aalborg theme: 

  • @Selen

    You can do it the way you want by modifying a few lines to mod/market/views/default/market/css.php

    /* Special for small devices */
    @media (max-width: 600px) {
        .market-item-list > .elgg-image-block > .elgg-image {
            max-width: 100px;
        }
        img.market-image-list {
            width: 100%;
        }
        .market-image-block > .elgg-image {
            min-width: 104px;
            margin-right: 5px;
        }
        div.market-image-block > div.elgg-body {
            float: left;
        }
    }
  • @slyhne  

    I also use Aalborg theme. But with Elgg 2.0.3 (I think no issue).

    I think you don't see it because the item description on your example is very short. Therefore the column-effect is not visible. The main picture takes up about 75% of horizontal space and text is aligned in the remaining 25% (all approximate percentages).  Thank you for pointing to code. I am trying out to change it to display main picture at top in small screen so text can also use all space underneath.

    Cheers

     

  • Hi @slyhne, thank you for this awesome plugin! I think adding a few options would be great! such as 

    - A report/flag option where users can report inappropriate products

    - May be a "Terms and conditions" field, where users can add the terms for individual products

    Cheers! 

  • @Jibin Kumar

    - The core plugin reportedcontent provides the ability to report inappropriate products.

    - You can easily add such an option. You could even write a plugin that provides that feature without toucing the market plugin.

    Happy coding

  • @Vextah, @Dave ONchE,

    Post deletion does not work in Elgg 2.2 (maybe also with Elgg 2.0 when getOwner seems to have been removed from the lib).  That might be the reason why @Vextah is getting error in deletions (though with Elgg 2.2, I get blank screen). Try commenting out the lines with getOwner() function call and use the function getOwnerGUID() by changing the underneath line. Seems to work but will be testing. regs.

  • Hello, could anyone give me a tip? I am wanting to change the time to expire from months to days. I know it's in the image.php file. And it's in that stretch. Should I change there, but I did not understand this 864000. I needed to have the option from 1 to 12 days.

     

    Image.Php

    header("Content-type: image/jpeg");
    header('Expires: ' . date('r',time() + 864000));
    header("Pragma: public");
    header("Cache-Control: public");
    header("Content-Length: " . strlen($contents));

  • 1 day in seconds is 60*60*24 = 86400. So, 864000 just means 10 days (added to the current time) as expiration period.

  • Thank you iionly. I have one more problem with this plugin. When I delete a post it happens the error below, it's just a snippet of error. I've already reviewed code. I have already tested all versions and the same error happens.

    Call to undefined function isloggedin () Error Object ( [Message: protected] => Call to undefined function isloggedin () [String: Error: private] => Error: Call to undefined function isloggedin () in /home/familia1/public_html/mod/market/actions/delete.php:8 Stack trace: # 0 /home/familia1/public_html/vendor/elgg/elgg/engine/classes/Elgg/Includer.php(18): include () # 1 /home/familia1/public_html/vendor/elgg/elgg/engine/classes/Elgg/ActionsService.php(176): Elgg \ Includer :: includeFile ('/ home / familia1 / ...') # 2 /home/familia1/public_html/vendor/elgg/elgg/engine/lib/actions.php(22): Elgg \ ActionsService-> execute ('market / delete') # 3 [internal function]: _elgg_action_handler (Array, 'action') # 4 /home/familia1/public_html/vendor/elgg/elgg/engine/classes/Elgg/Router.php(100): call_user_func ('_ elgg_action_ha ...', Array, 'action') # 5

  • My guess is you are using the plugin on a more recent version of elgg than the plugin was coded for.

    You need to change isloggedin() to elgg_is_logged_in()

  • Thank you slyhne. But problem continues. My elgg is 2.3. The plugin works only has problem in deletion. Would have another tip?
     
    
     

    Call to undefined method ElggObject::getOwner()

    Error Object
    (
    [message:protected] => Call to undefined method ElggObject::getOwner()
    [string:Error:private] => Error: Call to undefined method ElggObject::getOwner() in /home/familia1/public_html/mod/market/lib/market.php:68
    Stack trace:
    #0 /home/familia1/public_html/mod/market/actions/delete.php(20): market_delete_post(Object(ElggObject))
    #1 /home/familia1/public_html/vendor/elgg/elgg/engine/classes/Elgg/Includer.php(18): include('/home/familia1/...')
    #2 

  • // Make sure we're logged in (send us to the front page if not)
    if (!elgg_is_logged_in()) forward();

  • Thank you RvR. I unsubscribed the market and installed his hook. I was able to delete but when I add a new post, the save button is disabled when I type something in the description. And still the 4 graphics images are not loaded. Would have a solution?

Stats

  • Category: eCommerce
  • License: GNU General Public License (GPL) version 2
  • Updated: 2015-6-28
  • Downloads: 20624
  • Recommendations: 69

Other Projects

View slyhne's plugins