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

Cody Jordan Posted in Component Development 5 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
us Rishi B Replied 5 years ago

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

us Rishi B Replied 5 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 Discordinit() is not closed (requires a } closing brace at the end of the function). You want to close this function before the call to ossnregistercallback() at the end of the file. The second issue I see is that your second call to ossnregistersectionsmenu() 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 ossnregistersections_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 5 years ago

Btw ty for the response

us Cody Jordan Replied 5 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 5 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 )); ?