Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   How to write a proper shop page? (http://www.mysidiaadoptables.com/forum/showthread.php?t=4731)

parayna 12-16-2014 09:17 AM

OK, I'll check. I remember I had this problem with something else and I fixed it by putting stripslashes in the code.. but I'll look a moment.

OK, these are the screenshots (see if you can make any more sense of them XD)

  Spoiler: Images 

This is what happens when I create the page:

http://fc01.deviantart.net/fs71/f/20...mc-d8c8o93.png

You can see that it has added a slash:

http://fc01.deviantart.net/fs70/f/20...mc-d8c8oey.png

I edited the file with the name:

http://fc08.deviantart.net/fs71/f/20...mc-d8c8onk.png

Then when I tried to go onto the shop page (the default one where you pick what shop to go to):

http://fc00.deviantart.net/fs71/f/20...mc-d8c8orz.png

Then I went into the PHPmyadmin and changed it to get rid of the slash. It still didn't work and came up blank (this is what it was before I changed it):

http://fc00.deviantart.net/fs70/f/20...mc-d8c8p0z.png

Then I went back to shop creation (when it had a slash):

http://fc02.deviantart.net/fs70/f/20...mc-d8c8p5i.png

And this is what happens when I go into edit:

http://fc06.deviantart.net/fs70/f/20...mc-d8c8p8v.png

The name box cuts off everything after the slash. And when I had gotten rid of the slash in the database it just said 'Mai'. No slash nor the rest of the words... >.<


No idea of the problem :/

Kyttias 12-16-2014 03:04 PM

NPC text - Should be fine.
Item descriptions - Should be fine.
Item names - Where you want an apostrophe to appear, use ' instead:
Creator's Bracelet = Creator's Bracelet
Shop names - I thought of a fix! Where you want an apostrophe to appear, use *** instead. In view/shopview.php, change public function browse to:
PHP Code:

public function browse(){
    
$document $this->document;    
    
$str_shopname str_replace("***""'"$this->lang->welcome);                
    
$document->setTitle($str_shopname);
        
$shop $this->getField("shop");
        
$shop->display();


Mai***s Shop = Mai's Shop

parayna 12-16-2014 07:41 PM

OK.. before I do that, I have another problem. No idea why but I have only just noticed it. Took me about 1 hour and 30 minutes to finally figure out the pattern and what is wrong >.< But everytime I put this in the header:

HTML Code:

{$header->loadStyle("{$home}{$css}/tooltip.css")}
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
        <script src="{$home}{$js}/tooltip.js"></script>

It seems to break the user profile! Even though it shouldn't have anything to do with it. And I know that that it the cause as when I remove it it works perfectly normal and then when I put it back in it breaks again...

This is what happens:

http://fc01.deviantart.net/fs70/f/20...mc-d8c8pdg.png

Basically the URL shows the supposed to be invisible #visitormessage or #whatever. >.< And then when I remove it, it is fine! D:

I kinda want to move onto the inventory but I can't until I get all the little things sorted XD And I fixed the inventory names etc so thanks for that XD

Kyttias 12-16-2014 09:03 PM

Open up inc/tabs.php and delete the contents (but not the file). Open up your header.tpl and right after the link to tooltip.css, add in:

HTML Code:

<script src="{$home}{$js}/tabs.js"></script>
<script>
$(function() { $("#profile").organicTabs(); });
</script>

I'm not entirely sure what the issue was, but this fixed it. This was one of the only (if not the only) pages that used jQuery of the original site, and I think there was some issue with what order things were loading in.

parayna 12-16-2014 09:41 PM

Thank you ^_^ It worked! Phew... finally caught up! XD Now I just need to do the inventory and the items aspect (most of it) will be finished finally! (And I saw on another post you say you might put the NPC thing as a mod, and I think you should XD Many people would find it good, I think ^_^)

Could you help me with the inventory in this way, please?



^_^

Kyttias 12-17-2014 01:43 AM

Perhaps, but it'll take a little bit longer than the shop page did.

On a side note, I'm having a little trouble with an item I created that had an apostrophe, so, something tells me it's not safe to use them either. There should be a work around similar to how we figured out the shop names, though...

So please don't create any item names with apostrophes until I get back to you on this.

Another random fact about Mysidia in general (to be warned about)- If you try to rename an item but someone already owns one, it will also screw up their inventory - you have to rename the item not only in the items table, but also the inventory table for all users who may have it (the Search button at the top of the page will help with this, at least).

parayna 12-17-2014 06:20 AM

Oh, OK. Thanks for telling me XD I'll be sure to try and avoid it. For now, I am safe. But for future reference thanks :P

Abronsyth 12-22-2014 03:03 PM

Re:
 
Hey, sorry this isn't to do with helping out...

But I was wondering if either of you would be opposed to releasing the format for the shop page as a mod, or to me using the codes provided here with my own site?

Wanted to ask permission first, hehe. But this is pretty much exactly how I'd like to set up my shop pages (aside from the NPC being centered).

Let me know!

Kyttias 12-22-2014 04:11 PM

You're definitely welcome to use it. I'll try to tidy up all the information here into a mod so people have less to read through. It's hard to make a code for everyone, so I'll have to try my best to explain what's going on so they know how to implement their own layout plans. I commented my code and all, but I'm really not sure how straightforward it is currently. ^^;

edit: Official mod thread created!


All times are GMT -5. The time now is 09:05 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.