News:

Wondering if this will always be free?  See why free is better.

Main Menu

new help with mod - getting error message

Started by TheDragon, February 26, 2021, 02:20:17 PM

Previous topic - Next topic

TheDragon

https://vcsy-chat.com/Forum/index.php

with this mod
https://custom.simplemachines.org/mods/index.php?action=parse;mod=3474;attach=211876;smf_version=2.0.18

I made edits by hand (with parse instructions)

I get this error message when replying to an post
syntax error, unexpected ''karma'' (T_CONSTANT_ENCAPSED_STRING), expecting ')'

you can try to reply as a guest

thanks

smf v2.0.18

Aleksi "Lex" Kilpinen

You most likely made an error in your edits, changing the code structure somewhere a little.
Can you check your error logs? There might be a a bit more specific error logged that might tell us where to look.
Why did you install by hand to begin with, did you have trouble installing through the package manager?
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

shadav

it's best to ask for help in the mod's support thread: https://www.simplemachines.org/community/index.php?topic=486977.0

that being said, since you added it by hand...did you download the mod and unzip it, upload the db.php to your forums main folder, where settings.php file is located, and then go your your forum url/db.php to install the database functions and then delete the db.php file when done?

TheDragon

i did by hand as that is how O did my last 10 or so years ago
plus not sure how to use the package manager for this mod ??

I did put the DB.php in the correct folder
(did not know I was supposed to execute it -- silly me ??? never did that before???)

will try and report back



Aleksi "Lex" Kilpinen

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

TheDragon

ok - ran url/db.php
the screen turned white??
went back to the forum
same error message

found this in error logs
Apply Filter: Only show the error messages of this member The Admin
Apply Filter: Only show the error messages of this IP address 65.34.167.101 
   Reverse chronological order of list Today at 02:54:45 PM
Apply Filter: Only show the error messages of this session e3c8018a5961dbe73c166cd38782f40a
Apply Filter: Only show the errors of this type Type of error: Critical
Apply Filter: Only show the error messages of this URLhttps://vcsy-chat.com/Forum/index.php?action=dlattach;attach=819;type=avatarApply Filter: Only show the errors with the same messagesyntax error, unexpected ''karma'' (T_CONSTANT_ENCAPSED_STRING), expecting ')'

TheDragon

ok -
had saved all the old PHP files (3)
reloaded the old file
still same error ???

argh

help

Kindred

1- Questions regarding specific mods should be asked in the thread supporting that specific mod. It is linked-to from the mod download page. In this case: https://www.simplemachines.org/community/index.php?topic=486977.20

2- Use the package manager whenever possible.  The more manual edits you make, the harder it is to upgrade (and to remember what you have done)

3- If you actually restored the original files, the error would be gone (Unless your server has a cache, like Varnish).   Your error is not in the Karma.php file...    I would be you made a mistake in Display.php (maybe Display.template.php -- but I thing the Source file is more likely -- and I bet that, when you manually pasted the

'karma' => array(
'good' => $message['karma_good'],
'bad' => $message['karma_bad'],
),

that you mistakenly put it INSIDE the previous sub-array....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Matthias

Could you please follow these steps:

1. Upload the package file at this place:
Administration Center » Package Manager » Download Packages > Upload a Package

2. Click install package to parse the package
Post error messages at the mod specific thread, as kindred described
Quality first

TheDragon

I went to the package manager as you suggested
DL a package = you mean the ZIP file?
so, then Upload the Zip file?
yes I read the wiki - and for some reason - confusing to me

I also went to the forum page for this mod\
TONS of similar (not same) problems others had

argh
THANKS
working on - still not know why not working after returned to save PHP
can it be my DB was modded?


Kindred

no. the database changes have nothing to do with the files.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

TheDragon

well - went back to square 1
edited all by hand
VERY VERY VERY carefully
works now
I am guessing also not running the DB.php had an issue - then clogged the cache?
I also ran ALL the repair programs
anyway it now works - hope my client (aka pal) appreciates another lost afternoon at the beach

thanks all

Matthias

Could you please mark the topic as solved, thanks.
Quality first

Kindred

if you did not run the db insert, then the mod would not have worked, even with the correct code.

Seriously ---    USE THE PACKAGE MANAGER/ that's why we designed it.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

TheDragon


TheDragon

Quote from: Kindred on February 26, 2021, 07:02:27 PM
if you did not run the db insert, then the mod would not have worked, even with the correct code.

Seriously ---    USE THE PACKAGE MANAGER/ that's why we designed it.

I TRIED -= it did not have a downloadable link to it like most of the other ones did???
No worry, I won't be doing any mods as I can afford 10 hours to fix things that don't work again  :P


Aleksi "Lex" Kilpinen

#16
Just for future reference.

If the manual install instructions include a Code section with a .php file that says "This file should be able to execute standalone",
then you can manually install the mod and separately run the .php file to make the database changes needed. Like you did in this case.
That is the last part of the manual install instructions here https://custom.simplemachines.org/mods/index.php?action=parse;mod=3474;attach=211876;smf_version=2.0.18

If you would like to install the same mod through the package manager though, you could just download the .zip file from the mod download page. In this case, you would get the .zip file by clicking the postkarma.zip link at the right side of the download page here https://custom.simplemachines.org/mods/index.php?mod=3474

With the .zip downloaded, you could then just upload it to the package manager as is, and if there are code conflicts with the install the package manager will let you know where exactly those errors are, even before actually making any changes to your code. This way you don't need to manually do any changes, and you also get the option to easily keep record of installed mods, and if needed you can use the package manager to uninstall and reinstall those mods later on, avoiding the need to manually edit files.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

TheDragon


Aleksi "Lex" Kilpinen

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: