thedigicraft / Atom.CMS

Atom.CMS
56 stars 52 forks source link

PArt 79: Image won't change dynamically #226

Closed Chriswilldo closed 7 years ago

Chriswilldo commented 7 years ago

It's not the biggest issue in the world, but it'd be nice if I could get it to work. If i can't, I'll just move on. It's not a big deal anyways. If anyone could help me, I'd greatly appreciate it. It works, I just have to refresh. However it's been working like that since part 78 like it correctly should. My brain is fried right now and I'm completely lost.

Chriswilldo commented 7 years ago

If you could please specify what coding you need to look at also, I'd greatly appreciate it. My mind is not working right now...

creptor commented 7 years ago

ok I need to have these files:

admin/ajax/avatar.php
admin/view/users.php

With the version of the Dropzonejs and an user image directory (example: 'root/images/users/myimage.jpg').

With that I think I can fix it :yum:

Chriswilldo commented 7 years ago

users.php https://gist.github.com/Chriswilldo/9362c57a770fd48d53b399b7e7dabdbf

Chriswilldo commented 7 years ago

avatar.php

https://gist.github.com/Chriswilldo/80f3ff06a0da0ace13357ba9da020af0

Chriswilldo commented 7 years ago

I'm using the newest dropzone.js that they currently have on their website. the image directory is LastCMS/uploads i believe. Again, it worked at part 78 just fine, but part 79 wasn't changing it instantaneously. It still works after a refresh, but you know. I want it to be just like yours!!!!

creptor commented 7 years ago

Well, I couldn't catch any problems with your code, maybe you should try to see where the error is. It's quite simple, just follow this tutorial on chrome (it's a web file, no virus, just dismiss the alerts).

console debugging.zip

Note: Some things are in spanish due to operating system language. (read the notes)

Then please send me what you have gotten on the console, it would be easier for me to find the error.

Please while debugging upload an image, so the hole process is recorded on the console, if no error is given, please send screenshot of the 'network' tab in the developer console.

Chriswilldo commented 7 years ago

ah man.. I'll try redoing everything from part 79 one more time. Sometimes that helps i guess. Especially with $q = $r= $data = . Idk why but they always give me the most trouble if I don't put them in correctly the first time. I kind of figured i'd have problems. I could of sworn last time I did this I got it to work, but I ended up losing that laptop : '( . Worst case scenario I'll just leave it as is. It's not the end of the world. Rofl all I have to do is just press refresh.

Chriswilldo commented 7 years ago

Welp. I'm just gonna finish the site to the best of my ability, and if I feel like it , I'll get back to this part. I already wasted to much time on a technicality .

creptor commented 7 years ago

Yes, I would recommend that you get working all the php scripts after adding fancy JavaScript to make it feel more like an application.

Besides after that it should be easier to do that, because you will be sure how the application should feel like.