So I am a newb. What am I missing? Link below with github files

Cody Jordan Posted in Component Development 7 years ago

https://github.com/Wildindfw/add-discord-chatpage-ossn

I have no idea what I am doing really but trying to add two links to side menu with off site urls

Replies
gb Rishi B Replied 7 years ago

ack, sorry, the forum misinterprets the underscore character sometimes, hence the unnecessary italics in my post.

gb Rishi B Replied 7 years ago

I think you have most of it right, your syntax is just a little off in a few places. After you fix that error on line 12, the next issue I see is that the function Discord_init() is not closed (requires a } closing brace at the end of the function). You want to close this function before the call to ossn_register_callback() at the end of the file. The second issue I see is that your second call to ossn_register_sections_menu() has an unclosed array as an argument, and the function call itself is also unclosed. To fix this you just need to add: )); like you have in the first call to ossn_register_sections_menu(). Aside from that, it looks fine to me, but I may have missed something - I didn't actually try out your code, just glanced at it briefly.

us Cody Jordan Replied 7 years ago

Btw ty for the response

us Cody Jordan Replied 7 years ago

To add links to the menu. I’m trying to learn code without training it’s tough lol

German Michael Zülsdorff Replied 7 years ago

First of all: Good idea to share the code on Github!

Ok, so I installed your Github archive, but on enabling my site crashed with:

ParseError: syntax error, unexpected ")", expecting end of file in /components/DiscordChat/ossn_com.php:12

Now, that there's obviously something wrong in line 12, what's your intention when coding that )); ?