Jump to content

Schaken

Members
  • Posts

    182
  • Joined

  • Last visited

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Everything posted by Schaken

  1. PHP is REALLY more useful from what I see. C# is centered more towards desktop apps, video games, handling your computer tasks. If you mainly only care to handle things on the internet browser world, then there isn't much of a reason to learn C#. I make video games and have an online website community, so I know a little bit of PHP (Very little) but im pretty fair with C#. The command you sent me is great, but I can only use it on text. but I see you are telling maybe it's how it is turning the image into a string that may be the issue, rather than how I am turning it into a base64 encode. This is something I didn't think about. I will tackle that area; you may very well be correct. @Stuart Silvester this is the error I am getting: The last thing there mentions Dimensions, so I went to my gallery settings and set the maximum to the same dimension of the image I was uploading, that didn't seem to make a difference. So, I'm not sure what the error is telling me, unless it is trying to get the dimensions, but can't because it's getting the image as a fumbled letters and numbers like @IPCommerceFan was suggesting.
  2. I appreciate you jumping in. You are saying I should try to encode a text field as well and see how it turns out on the other side? Will it decode any text field on its own or is there a certain place I should send an encoded string to for testing? Your exact suggestion was why I tried using: A = System.Text.RegularExpressions.Regex.Escape(A); As this turns it into a URL friendly version. I will mess around with what you suggested with "Btoa" function, I never used it before but I will see if I can find a proper way to apply it and see if that helps. Again, thank you for your advice. I appreciate it. I just recently took on C# as the first programming language to learn, been at it for maybe 7 months. its alot to take in.
  3. So far I am getting the same result. it is telling me "No Image". I have it set to Debug and show me the results and the Encoded is an insane number of numbers and letters, so i know it is doing something and appears right. Also, all the letters you have set to change did in fact change. Here is an update to the code. You can see the different things I tried. I changed it over to using OAuth2 instead of RestAPI, as most things usually work easier using OAuth2. public void UploadImage() { StartCoroutine(PostTopicPostsA()); } IEnumerator PostTopicPostsA() { byte[] imageArray = System.IO.File.ReadAllBytes(FileDir); string A = Convert.ToBase64String(imageArray);//.TrimEnd('=').Replace('+', '-').Replace('/', '_'); A = System.Text.RegularExpressions.Regex.Escape(A); Debug.Log("Image string: "+A); Debug.Log("Imape Path: "+FileDir); Dictionary<string, string> content = new Dictionary<string, string>(); content.Add("category", "27"); content.Add("image", A);//ImageString); content.Add("caption", ImageTitle.text); // Filename? content.Add("filename", ImageTitle.text); // Real title. content.Add("description", ImageDescription.text); // Description. UnityWebRequest www = UnityWebRequest.Post("https://schaken-mods.com/api/gallery/images", content); www.SetRequestHeader("Authorization", "Bearer " + OAH.BearerID); yield return www.SendWebRequest(); if (www.result == UnityWebRequest.Result.ConnectionError) { Debug.Log("Error While Sending TEST: " + www.error); } else { string result = www.downloadHandler.text; string FullTXT = System.Text.RegularExpressions.Regex.Unescape(result); Debug.Log("TEST: " + FullTXT); } } Result Debug Log: and it DOES upload... just its empty. I downloaded it and the file size was 0. This is just not making any sense to me why it is NOT working. This tells me every part of my code is working, except for the Base64 Encoded field. and obviously it is very close, otherwise it would tell me "No_Image"
  4. I love how you take that extra step and even look up functions and convert and rewrite in a language you aren't familiar with, just to give a better customer service. I really appreciate you. I will work on this for a while and if I can't get this to work or any variant, I will let you know. IF I understand this right, I'm replacing all "+" signs with a "-" sign, replacing all "/" signs with a "_" sign, and trimming everything after the last "=" sign?
  5. I am building a game, and in the game, users will be able to upload their screenshots to the community. I got it all working but everything I try I get 1 of 2 errors. The API returns Error "No_Image" or Error "EXO" (Unknown) In C# there is a very easy way to encode any byte date into a base64 Encoded format, so I dont think there is anything wrong with my code. Does anyone have any ideas on why im getting this issue? There is API for other sited that require filed in the same fashion, im using the same code I do this with them, and dont have issues until I use it on Invision. byte[] imageArray = System.IO.File.ReadAllBytes(FileDir); string base64ImageRepresentation = Convert.ToBase64String(imageArray); Dictionary<string, string> content = new Dictionary<string, string>(); content.Add("category", "27"); content.Add("image", base64ImageRepresentation); content.Add("author", "3"); content.Add("caption", ImageDescription.text); content.Add("filename", ImageDescription.text); content.Add("description", ImageTitle.text); UnityWebRequest www = UnityWebRequest.Post("https://xxxxxxxxxxxxx.com/api/gallery/images?key=xxxxxxxxxxxx551", content); yield return www.SendWebRequest(); if (www.result == UnityWebRequest.Result.ConnectionError) { Debug.Log("Error While Sending TEST: " + www.error); } else { string result = www.downloadHandler.text; string FullTXT = System.Text.RegularExpressions.Regex.Unescape(result); Debug.Log("Returned message: " + FullTXT); }
  6. uhh, I'm not sure what you mean by fitting so many. I select "Groups" and select members, which is the entire community. My community is currently 149288 members. But it does not mess up when sending any notifications at all. the only issue is when I merge an account. I have members that will buy a membership and then make a new account and then complain to me because their new account doesn't have a membership on it. Granted they are idiots, but still I try to just merge their accounts and I get an error and it don't merge, this was the error that I showed you. Ill make sure you have admin access and ill PM you the details to gain access. thank you.
  7. I kept getting wild errors when I would merge user accounts. Took me a long time to track it down, turns out it is this, or maybe this app is not compatible with another app I have. When I disable this app, I can merge accounts just fine without an error. otherwise it gives me an error and wont merge them fully.
  8. thank you. I will apply the latest update and let you know. I appreciate the help.
  9. I was once with stripe, stripe dropped me because my video game website had pretty women in it. they are suer strict, I was actually using square, but they just updated their API so i am looking either for a new card processor or someone to re-write my app as well.
  10. I wish you luck! I hope you enjoy your new career, and I hope you find time to still help this community as you have for so long! Thank you for all you have done here!
  11. Hello all. Today a member contacted me saying they were unable to end a subscription, they seen an error about a theme with a template instead of their billing agreements. So, I went to go look and sure enough. it was at Nexus > Front > Clients > BillingAgreement. I went and deleted things one by one until I found it. {{if \count( $purchases[0] )}} <hr class="ipsHr"> <h2 class="ipsType_sectionHead ipsSpacer_bottom">{lang="billing_agreement_purchases"}</h2> <ul class='ipsList_reset'> {template="purchaseList" group="clients" params="0, $purchases, FALSE, $billingAgreement"} </ul> {{endif}} to be exact, it is just the "{{if \count( $purchases[0] )}}" part. My theme is not edited here, and to verify i went to my IPS Default (I never edit this theme) and it also had this same code and had the same error. I was wondering if anyone else had this or if it was just me? here is the log error: TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /home/admin/web/XXXXXXXXX/public_html/system/Theme/Theme.php(885) : eval()'d code:802 Stack trace: #0 /home/admin/web/XXXXXXXXX/public_html/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_nexus_front_clients->billingAgreement() #1 /home/admin/web/XXXXXXXXX/public_html/applications/nexus/modules/front/clients/billingagreements.php(150): IPS\Theme\_SandboxedTemplate->__call() #2 /home/admin/web/XXXXXXXXX/public_html/system/Dispatcher/Controller.php(107): IPS\nexus\modules\front\clients\_billingagreements->view() #3 /home/admin/web/XXXXXXXXX/public_html/applications/nexus/modules/front/clients/billingagreements.php(49): IPS\Dispatcher\_Controller->execute() #4 /home/admin/web/XXXXXXXXX/public_html/system/Dispatcher/Dispatcher.php(153): IPS\nexus\modules\front\clients\_billingagreements->execute() #5 /home/admin/web/XXXXXXXXX/public_html/index.php(13): IPS\_Dispatcher->run() #6 {main}
  12. hey @Adriano Faria thanks for updating this! I was wondering if there was an API for this as well, so I could upload/download, etc via API as well.
  13. In the API, Members followed content. In my community I have it set up to follow files that people download, and follow topics members comment in. This being said on my user account I have 300 pages of content. If I were to try to make a list of things, this is insane. A feature to filter by app, like (filterBy = Downloads) would be awesome and make this usable for larger communities. Right now the only parameters are page, and items per page. Adding to this would be wonderful.
  14. well, here in 7 days this either gets updated or it won't be available to the community anymore. Invision is forcing the PHP update in 1 week. being that he said he would do it a month ago and hasn't yet, I am done holding my breath...
  15. You will have to excuse me, im not real good with PHP and using Invision Community to diagnose it. When i go to "Support" and click on "Incompatible PHP APPS" this is what pops up: Application Forms Mismatching parameter list \IPS\form\Log::getItemsWithPermission() N/A /applications/form/sources/Log/Log.php:730 /system/Content/Item.php:2947 I have THOUSANDS of "App Scanner" logs. Even when I'm not even in the ACP, I think this app scanner thing may be faulty. It's insane trying to shuffle thru it all to find any kind of real log. I'm not real sure where else to look for these errors sadly. I sent you everything I can find. I updated the app earlier and I showed you what happened there. I had to download files from my testing server and upload the old version into my current website to fix it. I am willing to look wherever you would like mt to, just tell me what to look for.
  16. same. [Thu Oct 20 10:57:08.331210 2022] [php:error] [pid 15393] [client xxx.xxx.xxx.xxx:37156] PHP Fatal error: Cannot use "parent" when current class scope has no parent in /XXXXXXXXXX/public_html/system/Theme/Theme.php(2703) : eval()'d code on line 31, referer: /XXXXXXXXXX/admin/?app=core&module=system&controller=login&error=&ref= [Thu Oct 20 10:59:43.040307 2022] [php:error] [pid 8488] [client xxx.xxx.xxx.xxx:38218] PHP Fatal error: Cannot use "parent" when current class scope has no parent in /XXXXXXXXXX/public_html/system/Theme/Theme.php(2703) : eval()'d code on line 31, referer: XXXXXXXXXX/files/category/93-skyrim-special-edition-guild-mods/ [Thu Oct 20 11:01:25.344166 2022] [php:error] [pid 6123] [client xxx.xxx.xxx.xxx:38804] PHP Fatal error: Cannot use "parent" when current class scope has no parent in /XXXXXXXXXX/public_html/system/Theme/Theme.php(2703) : eval()'d code on line 31
  17. @Mark H you are correct. I am not very savvy with the server side of things, I have a friend that helps me there. I showed him what you sent and he gave me this, I hope this is what you were asking for. [Sun Oct 16 08:21:04.053884 2022] [php:error] [pid 54313] [client xxx.xxx.xxx.xxx:55162] PHP Fatal error: Cannot use "parent" when current class scope has no parent in /home/admin/web/schaken-mods.com/public_html/system/Theme/Theme.php(2703) : eval()'d code on line 31, referer: https://schaken-mods.com/admin/?app=core&module=system&controller=login&error=&ref= This would happen when we would try to login. As soon as we went back to PHP 7.4 we could log in fine, and the only thing I touched was the RSS imports, a bad XML was being read from someone else's RSS and made the RSS importer task stop. Once I fixed it by disabling that import, we switched back to PHP 8.0 and everything worked well again. This could very well be some dumb mistake on my end, but if I don't post it here for you professionals to dumb it down for me, then I will never know what I am doing wrong. If I am lucky and actually found a bug, then hopefully I helped someone else out as well by making you all aware, as you all always fix stuff very fast.
  18. I did not realize the PHP still functioned when disabled. I will go thru my disabled apps and uninstall the ones I know I am not using. You are right that I have a high number of 3rd party apps. I think close to half are outdated and disabled, but not removed. I will do that today. here is the 500 error. Also the error log was coming up empty, that is what was so strange about it. We get errors like members failing their OAuth2 logins and random stuff like that, I also have a testing page where I build stuff and google catches it and sometimes a user finds it and I get an error there, but rarely do I ever have any real errors.
  19. I have nothing custom there. It is the standard RSS Importer option with nothing extra.
  20. So, I spent the last 24 hours combing thru everything on my site. I have a private server so I couldn't exactly ask for help... I switched to PHP 8 a few maybe 5 days ago and I have been fixing things ever since, I thought I finally had everything all fixed until all of a sudden, my ACP just wouldn't load. i was getting a 500 error. So, I was digging around and for the life of me, I just couldn't find what was wrong. I was undoing edits, I was updating everything i could think of, i disabled every 3rd party app and plugin, I restored a backup... nothing was fixing it. So as a last resort, this morning, I switched back to PGP 7.4. Sure, enough it loaded. I have about 25 different RSS imports and I noticed the RSS task locked up, it was a blog RSS repost. I have all my RSS running thru another RSS app to help fix goofy RSS services so Invision's RSS importer can read them easier, less errors. long story short, I disabled the bad RSS import, restarted the task, and I thought to myself, "What if that was it? So, I switched back to PHP 8.0, and everything works perfect again... Granted, I realize some RSS is just complete poopie in design, I can't fix that, and I expect some errors to happen, BUT to hit so hard it crashed my ACP? I would love for the staff to look into this... Here is the RSS XML. I suggest the community to NOT test this... https://rss.app/feeds/5hiBpefvdcVTaMP6.xml I use RSS.APP service, it is very handy and cheap, works really well, and Invision RSS Import works really well with it.
  21. There isn't really a way to say PING! here, so ill just make a dump post in hopes that this will be seen more and thought about more. 😄
  22. I see that! I just updated to PHP 8.0 and I'm still stomping out the fires that caused. here in a couple days when everything is stable, I will gladly update, thank you for your response!
  23. I just updated. If there is something you need, please let me know. I CAN provide FTP, but I don't even use it really, My Control panel has a file explorer I use. Plus, I'm stingy with who has access to it. My website is what financially supports me and my 2 daughters, so giving access to that makes my nerves shot, sorry. I do provide ACP access for you, which with that you should be able to see anything you would need short of the PHP files, which should be the same. I am not using PHP 8.0 yet, I plan on updating today actually, so if you want to wait until tomorrow for that to be done first, then I understand.
×
×
  • Create New...