Skip to content
View in the app

A better way to browse. Learn more.

MagicDuel Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Seems Like A Script Bug

Featured Replies

echo @content[0]

echo @content[1]

i used both on the same content at different times and the font size was bigger with 0 than 1. Thought it was odd if it's not then why?

Edited by smartalekrj

It depends on the HTML structure you output.
Putting it into a new <table> for example, will not give the table's cells the storyline-text class. Can you post the conent and how you are echo'ing it?
Its fine if you omit the actual story content, put anything in there as long as you how what kind of HTML you are displaying.

My suggestion is use either MD's default CSS or write up your own.

Remember that @content[0] will always be placed on the page, regardless of whether you echo it or not. It will also appear [i]after[/i] your code output.
To avoid this, do not give any @content[0], start your content section from @content[1] instead :)

now, i guess that's not a script bug, but it's still puzzling me...

when i try to echo short sentences, they lose their layout, specially caps, which is pretty annoying -.-

[php]echo ""; If (uv('heads')>6){ echo "You are in danger, get rid of your ".uv('heads')." Heads!!"; }else{ echo "This is still a sanctuary place for you, enjoy the benefits while you can^^";}[/php]

that's what i write in the code, pretty easy [ignore the empty echo, that's what i do to make it show content 0 because i'm too lazy to type more XD]

but what i get of it is that:
[php]you are in danger, get rid of your 12 heads!![/php]

How can i make the caps be caps? And i also intended to use 'safe place', how can i tell the code that safe is not supposed to be a code-word in that context?

  • Root Admin

Normal php will preserve the capitals, Which means its a mdscript Bug.

Also burns try and format your code a little better, new lines for example

[php]
echo "";
If (uv('heads')>6){
echo "You are in danger, get rid of your ".uv('heads')." Heads!!";
}else{
echo "This is still a sanctuary place for you, enjoy the benefits while you can^^";
}
[/php]

This makes debugging easier as you can check for all those semi colons that you might have missed and such.


perhaps try this to make sure safe isnt being used incorrectly

[code]echo "This is still a Sa" . "fe place for you"[/code]

i would check, but have no access to mdscript...

Edited by Chewett

@Grido: if I read correctly on the other thread, using /safe place/ will make the program treat safe place as a word and not as a code.

thanks a lot, that little "."-trick in between solved the code-word issue perfectly :)

and thanks for the hint with the layout...
looks better, and surely makes more complex things easier ^^

Edited by Burns

Your script output will always be in lowercase, this is in order to ensure security.
The best way I can suggest to overcome this is put the text you want to display into the content section
The uppercase/lowercase functions have not bee allowed, they would be a nice addiiton, although a pain to simply capitilise single letters repeatedly.

It might be to preserve case integrity while still providing the protection. For now use the content section.

@Udgard: I haven't seen the /safe place/ keywords, could you post the link?

  • Author

[quote]Remember that @content[0] will always be placed on the page, regardless of whether you echo it or not. It will also appear after your code output.
To avoid this, do not give any @content[0], start your content section from @content[1] instead
[/quote]

thnks content[0] was the issue... also i HAVE to have echo there otherwise i end up with an error

It should not be forcing you to echo any content if you don't want to.

Have you tried something like this:
[code]
<!-- content separator -->
content1
<!-- content separator -->
content2
<!-- content separator -->
content3
<!-- content separator -->
content4
[/code]

  • Root Admin

[quote name='Rendril' date='29 October 2009 - 02:01 PM' timestamp='1256824864' post='46057']
@Udgard: I haven't seen the /safe place/ keywords, could you post the link?
[/quote]

i believe he was refering to escaping the * in lho's names, this does work overall udgard

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Forum Statistics

  • Total Topics 17.5k
  • Total Posts 182.2k

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.