Jump to content
×
×
  • Create New...

Market Online & Item Shop


Recommended Posts

  • Premium

M2 Download Center

Hidden Content

    Give reaction to this post to see the hidden content.
( ItemShop 1.5 )

Hidden Content

    Give reaction to this post to see the hidden content.
( 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:

http://i.imgur.com/LF8DLpk.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

  • Metin2 Dev 45
  • Love 39
  • Love 10
  • Good 33
  • Scream 2
  • Think 1
  • Angry 1
  • Dislove 1

spacer.png

Link to comment
  • 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
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

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
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
  • 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
  • Premium

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
  • 3 weeks later...
  • 2 weeks later...
  • 4 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Announcements

  • -15% Discount in Metin2 Dev Store (01/10/2021 => 31/12/2021) => Code => 15_PCT_OCT_TO_DEC_2021


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.