News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

ST Shop

Started by Diego Andrés, June 13, 2009, 06:06:35 AM

Previous topic - Next topic

mickjav

Quote from: Diego Andrés on January 10, 2024, 02:47:07 PMI think that is not a feature because it would require 'tracking' the content that is being deleted with the corresponding credits.
I'll check later to be sure.

Thanks
Site Under redesign not expected to be complete before July 2025

Diego Andrés

It does seem implemented in Integration/Posting.php in the remove_message method.
You could just invert the condition if the shop is disabled.

if(empty($modSettings['Shop_enable_shop']))

SMF Tricks - Free & Premium Responsive Themes for SMF.

mickjav

Quote from: Diego Andrés on January 10, 2024, 10:50:21 PMIt does seem implemented in Integration/Posting.php in the remove_message method.
You could just invert the condition if the shop is disabled.

if(empty($modSettings['Shop_enable_shop']))

I'll give it a go tonight, but should be working with my modsetting as that has a value of 1.

All the best mick
Site Under redesign not expected to be complete before July 2025

mickjav

#703
Quote from: mickjav on January 11, 2024, 01:14:04 AMif(empty($modSettings['Shop_enable_shop']))

Tried That without any luck.

Have now added shop to my main site and have even removed my prize system edit again without any luck  :(

Everything I try fails, so will prob just have to live with it.

I do get the feeling the functions not being called for some reason

I'll continue updating the posting as still have my register entry to add.

One good thing for me is while working with The shop I've learnt how to work with members prifile so should be able to start messing them up soon lol

All the best mick.

PS. It seems that only some boards Are laving like credits applied I've looked at the board settings and can't see any difference other that the one that applies credits is set to reply Only.

Although a log is being created?
Site Under redesign not expected to be complete before July 2025

Diego Andrés

Credits can be enabled/disabled per board. Check those boards that aren't sending credits, perhaps they have different settings.

SMF Tricks - Free & Premium Responsive Themes for SMF.

mickjav

I did check And they all have the default value of:

You cannot view this attachment.

But just checked the boards table and only one field has a default?

You cannot view this attachment.

Site Under redesign not expected to be complete before July 2025

mickjav

Just figured the Modsettings for topics and post are only defaults for when a new board is created, then each board then has their own setting, I'll need to make sure members know what they get for each board if I edit that.

It's very useful  ;D

still didn't solve the issues though  :(
Site Under redesign not expected to be complete before July 2025

Diego Andrés

For the deleting try in Shop.php
add_integration_function('integrate_after_create_post', __NAMESPACE__ . '\Integration\Posting::after_create_post#', false);
Add after
add_integration_function('integrate_remove_message', __NAMESPACE__ . '\Integration\Posting::remove_message#', false);
Though it might not work great or be inconsistent, which is why it isn't implemented.

SMF Tricks - Free & Premium Responsive Themes for SMF.

mickjav

Quote from: Diego Andrés on January 13, 2024, 02:57:07 PMadd_integration_function('integrate_remove_message', __NAMESPACE__ . '\Integration\Posting::remove_message#', false);

Don't seem to work  on test site, but will replace my posting copy for a clean copy just to make sure it's nothing I've done.

Thanks for your help mick
Site Under redesign not expected to be complete before July 2025

overdue

Is there a way to have multiple sized items? Smaller items get resized and end up looking terrible.
2.1.4; default theme - curve.

Diego Andrés

Some things are very old and can cause issues like that...
Best bet for you is editing Sources/Shop/Helper/Format.php

$formatname = '<img' . (!empty($class) ? ' class="' . $class . '" id="' . $class . '"' : ''). ' src="' . self::$items_url . $image . '" alt="' . $description . '" title="' . $description . '" style="vertical-align: middle;width:' . $modSettings['Shop_images_width'] . ';height:' . $modSettings['Shop_images_height'] . ';" />';
Could try with something like this:
$formatname = '<img' . (!empty($class) ? ' class="' . $class . '" id="' . $class . '"' : ''). ' src="' . self::$items_url . $image . '" alt="' . $description . '" title="' . $description . '" style="vertical-align: middle;" />';
Or this:
$formatname = '<img' . (!empty($class) ? ' class="' . $class . '" id="' . $class . '"' : ''). ' src="' . self::$items_url . $image . '" alt="' . $description . '" title="' . $description . '" style="vertical-align: middle;width:' . $modSettings['Shop_images_width'] . ';height:' . $modSettings['Shop_images_height'] . ';object-fit:scale-down;" />';

SMF Tricks - Free & Premium Responsive Themes for SMF.

Senkusha

I have a question:  Does this mod account for edits to a post if the Bonus is enabled to count words?  Say a member writes three sentences in a post, gets distracted and posts, but then comes back later and writes five more paragraphs that elaborate on what they were saying?
--Senkusha
The Anime Brigade
Anime-style Role Playing Games and Discussion.
(SMF v. 2.1.4, PHP v. 8.0)

Diego Andrés

I don't think it does it at the moment.
Would it be beneficial? The bonus sometimes can be prone to abuse so I'm not sure.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Senkusha

I think it would be.  Of course, I would think that it would also subtract bonus points if the post word count decreases.

I would think that when editing a post, the first thing it would do is capture the current word count bonus.  Then when the post is submitted, subtract that initial value from the total points accumulated, then add the new bonus word count, and apply it to the total.
--Senkusha
The Anime Brigade
Anime-style Role Playing Games and Discussion.
(SMF v. 2.1.4, PHP v. 8.0)

Diego Andrés

I'll log this and consider it for a future update

SMF Tricks - Free & Premium Responsive Themes for SMF.

Grendor

Hey,

Can this mod have some parts disabled by admin?

I need a mod where people can request items and number they will need.
Then Admin or assigned group can input current stock.
And if possible how many are being built of the item requested.

I dont need cost, dont need game room, dont need trade log.

Can this mod do what I need, please?

So to be clear any assigned group can add item name and number needed.
Then assigned group can add current stock.

There will be no sales or trades, no games, no pictures ect..


Thanks
Grendor

Diego Andrés

You can disable stats, trade, games room, gifts, bank. All of these settings are in the main settings page.
Not sure if it will fit your specific requirements.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Grendor

Quote from: Diego Andrés on May 16, 2024, 12:18:02 AMYou can disable stats, trade, games room, gifts, bank. All of these settings are in the main settings page.
Not sure if it will fit your specific requirements.
Quote from: Diego Andrés on May 16, 2024, 12:18:02 AMYou can disable stats, trade, games room, gifts, bank. All of these settings are in the main settings page.
Not sure if it will fit your specific requirements.

Hello,

Thanks for letting me know, I really appreciate it.

Have great day
Grendor

Chen Zhen

@Diego Andrés:

Does this mod include custom integration hooks so other mods don't have to manipulate the DB directly to work with it?

My SMF Mods & Plug-Ins

WebDev

SMF support staff should be shaping a positive community experience & not provoking an argument or emotional reaction.

Diego Andrés

I don't have specific actions so realistically you could use any default SMF hook for any vanilla interaction.
What are you trying to accomplish? Just sending credits? You can safely query anything or use the member update function to change a specific user credits.

I could also write an Addon for your use case down the line if it would be better suited to handle it on my side as an additional integration.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Advertisement: