Jump to content

Market Online & Item Shop


Recommended Posts

M2 Download Center

This is the hidden content, please
( ItemShop 1.5 )

This is the hidden content, please
( Market + ItemShop 1.5 )

Hello guys. :)

A few try to describe what I developed.

 

We have created a place where players can buy and sell items from each other. I worked on bootstrap because such a platform deserves to be accessed from a wide range of devices, not just on the desktop. Communication with the database is done using the PDO extension. The platform is available in 8 languages:

https://metin2.download/picture/E38ha41LB1eQqpK0Zmzt81y5R2Noyo37/.jpg

Data related platform are stored in a SQLite database, no longer need for a new database. It included a store of objects (Item-Shop). It can add items with bonuses and can make payments with paypal for dragon coin.

 

Attention! Site to function properly, you must login as a player, last_play table must be updated.

Objects can be marketed after 10 minutes after disconnecting character. (Because dbcache's)

 

Download: http://market.metin2cms.cf/

Download only item-shop, without market: https://market.metin2cms.cf/ishop

Preview: https://market.metin2cms.cf/preview

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 187
  • kekw 7
  • Eyes 4
  • Dislove 1
  • Angry 3
  • Not Good 1
  • Cry 1
  • Smile Tear 1
  • Think 3
  • Confused 3
  • Scream 5
  • Good 74
  • Love 17
  • Love 128

spacer.png

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

I get this warning when i want to loggin and when i want to loggout:

Warning: Cannot modify header information - headers already sent by (output started at /home/metindi3/public_html/market/include/functions.php:1) in /home/metindi3/public_html/market/include/functions.php on line 81

But if i refresh the page everything it's ok,warning just gone,how can i fix it ?

Link to comment
Share on other sites

On 5.12.2016 at 8:40 PM, emanuel said:

I get this warning when i want to loggin and when i want to loggout:


Warning: Cannot modify header information - headers already sent by (output started at /home/metindi3/public_html/market/include/functions.php:1) in /home/metindi3/public_html/market/include/functions.php on line 81

But if i refresh the page everything it's ok,warning just gone,how can i fix it ?

 You are trying to send headers information after outputing content. Thats wrong. I guess you will redirect to another page after login process with something like that?: 

header("Location: http://www.example.com/");

When refreshing the page it certainly works because the header() function is firing during the login process. After refreshing you are logged in already - thats the reason why this warning only appears ones after clicking login

This answer will help you to understand the problem: http://stackoverflow.com/a/8028987

I dont know your code so i can give you a tip which could work. Add 

exit;

right after the header(); function.

  • Metin2 Dev 1
  • Love 4
Link to comment
Share on other sites

Its a good practice to call exit() right after  header() so that code below does not get executed. In mind of that, the problem is an output before the header function. You will need to verify that this code gets run before any other output as well.

You should not echo (or direkt html output) anything right before the header() function, as doing so will more than likely throw a warning. Debug your code an find out what code generates an output. No one can tell you where exactly this happens without looking in your code.

 

if you realy dont know how to solve your problem because of bad programming knowledge, you can use the following code instead of  header() . Be warned: this is a realy bad codestyle and not recommended (discouraged by the W3C):

 $url='http://www.your.url';
 echo '<META HTTP-EQUIV=REFRESH CONTENT="0; '.$url.'">';

this will output an html meta tag which redirect the user.

 

  • Love 1
Link to comment
Share on other sites

  • Honorable Member

Just do it as @Ayaka told you.

Use the bad style and put a html based redirect anywhere in your script.

Or do it with header(); and don't do any output (eg: echo, var_dump, print, print_r) before it. You can also put a delay like it's shown here: http://stackoverflow.com/questions/11299006/header-location-delay

  • Metin2 Dev 1
  • Love 3
Link to comment
Share on other sites

22 hours ago, Ayaka said:

Its a good practice to call exit() right after  header() so that code below does not get executed. In mind of that, the problem is an output before the header function. You will need to verify that this code gets run before any other output as well.

You should not echo (or direkt html output) anything right before the header() function, as doing so will more than likely throw a warning. Debug your code an find out what code generates an output. No one can tell you where exactly this happens without looking in your code.

 

if you realy dont know how to solve your problem because of bad programming knowledge, you can use the following code instead of  header() . Be warned: this is a realy bad codestyle and not recommended (discouraged by the W3C):


 $url='http://www.your.url';
 echo '<META HTTP-EQUIV=REFRESH CONTENT="0; '.$url.'">';

this will output an html meta tag which redirect the user.

 

Ye ayaka,that's working,have my respect for your time! Thx!

22 hours ago, Ayaka said:

 

Be warned: this is a realy bad codestyle and not recommended (discouraged by the W3C):

 

Why is bad codestyle,whatt that code can do ?

  • Love 1
Link to comment
Share on other sites

  • Honorable Member
10 hours ago, emanuel said:

Why is bad codestyle,whatt that code can do ?

Google hates it. Really.

In general we can say that the html redirect is just a "workaround" when you don't have any other possibility to do it (e.g. via htaccess/redirect engine or php). The html redirect looks really spammy for Google itself because Google will think that this is only a temporary redirect (302 vs. 301).

Additionally to this, the W3C (as mentioned >>here<<) discouraged this method because unexpected refreshs can disorient users.

  • Love 4
Link to comment
Share on other sites

Sorry for today, I was careful with the redirection. I did an update whereby I fixed the problem.

You can download again from the site and keep your data from include/site.db or only replace files from include/ : "functions.php", "pages-config.php" and "shop-config.php". :)

spacer.png

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...
  • 4 years later...
  • 1 year later...

metin2cms Market is not working properly, I suggest NOT to use this it.

Because

1. put a item to sell
2. drop this item on the ground
3. login to the website with a different account and buy it
4. Pick this item again from the ground
5. BOTH buyer and seller have the same item

Edited by lordzokarum
Link to comment
Share on other sites

  • Premium

Be aware of what lordzokarum said. Nobody ever should develop a website-game item or yang data transfer. Simply because you can duplicate the items. For every action you do in game like item drop, add into a shop or something you need to add a function that blocks other actions and etc and that's an workaround. I don't see how this can be safely made.

Edited by Speachless
  • Good 1
Link to comment
Share on other sites

On 11/10/2022 at 1:28 AM, Speachless said:

Be aware of what lordzokarum said. Nobody ever should develop a website-game item or yang data transfer. Simply because you can duplicate the items. For every action you do in game like item drop, add into a shop or something you need to add a function that blocks other actions and etc and that's an workaround. I don't see how this can be safely made.

Check this server.. http://www.ekura.cz There is marketplace like 6years+ and works fine.. Just they using safebox for items..

Due to the age and the fact that they put it in the warehouse.. My guess is that they use a separate table, where the safebox storage is changed for a special table and the whole marketplace goes a bit out of the game.. It just simply returns the items or yang back. Because once the item is placed in the warehouse and subsequently in the marketplace, it disappears from the warehouse.

They had the marketplace before the source codes

Edited by Pseudabo
  • Metin2 Dev 1
  • Love 2
Link to comment
Share on other sites

  • 3 months later...

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.