![]() |
This one gives users a way to edit their attached text (.txt) files inside the forum system, without the hassle of downloading-editing-updating the file every time. :)
(needless to say only mods and the poster can see the link / access the editor) I thought of it while updating a hack of mine, because I had to do it numerous times and it really got on my nerves. :o If you want to see a demo, either attach a small file here and see how it works, or just look below in the next post for a screen shot. :) (the image is also in the zip file) Anyhow, here are the instructions to install the hack. First download the attached zip archive so you can have the files you need in front of you. A text version of this post is available in the zip as well.
Have fun! :china: |
A screen shot...
|
Excellent idea FireFly, I'm going to check this one out ASAP.
|
Great hack, Thanks.
|
Nice hack, although I am using 2.2.1 because I do not feel like re-applying 20 hacks to the board when almost every file has been edited in some way or another.
From the looks of it though, it would be a great tool, not only for those here, but many others as well. Great job! |
Lesane always is the first or second person that replies to a new hack post, and always replies "Great hack, thanks" :D
But in all seriousness chen, great hack, thanks! :D:D |
Quote:
|
Just testing to see it work.....
|
wow - very nice. I like that! Don't think I'll need it on my site though as only admin can attach files, and they are always .gif files.
Nice work though. |
testing also
|
I dont seem to be able to get this to work, i done everything, been through it twice and double checked it also.
and i still dont get the edit bit after the attachment :( any ideas ? got vb 2.2.2 |
Only seen after .txt files, Danny.
Are you sure you uploaded the files as well? (sounds basic but you'd be surprised how many people skip that step :D) |
working good for me.
Thanks |
i tryed to install this as well. I get the link but it points to a blank page. Nothing on it. I even went threw all the codes and changes all .php to .php3 ( because thats what I use ).
Any suggestions on what to do? |
Have you edited misc.php correctly?
|
Yes i have. I added what I had to. And changed global.php to php3 ofcource. But I will re do it. And see if I can see what I did wrong. But thats the only problem right? The misc.php3? Because I see the link and everything just nothing in my misc.php3 when I click the link..
|
ok i redid it. This time im getting this error
Fatal error: Call to undefined function: adminlog() in /home/fatali/public_html/VB-Home/misc.php3 on line 13 Even tho i didnt touch no where near that line. |
work also with .nfo files?
|
How about adding the ability to turn word wrap on or off in the editor? :)
|
Firefly,
Maybe next time you should tell us WHICH misc.php to edit. :) I got it straightened out after editing the wrong one. I was getting the same things going on as Preasidium, where when I hit edit, it gave me a blank page. Once I took it out of the admin/misc.php and put it in the root/misc.php, you'd be surprised at how well it worked. :) Great hack, though! Looking forward to more! :) BTW: Admins, Supermods and Mods can edit the file, right? Will it also not increase the download counter for those 3? It doesn't seem to and I wanted to make sure it was supposed to do that. Also, I had to clean my cache for the edited file to show up. Is that normal and if so, is there anyway to fix that so we don't have to clean the cache everytime to check it while viewing? |
I had the attachment editor working great. I just installed the attachments as files hack and now the attachment editor comes up ok, but the file is empty in editing mode. In view mode, the whole file is there. I doubled checked everything and I have found 2 instances of the code where I need to add the usergroupid code. I tried taking one of them out and that just makes it worse. Has anyone else run into this problem? Can someone please help me on this?
|
This hack won't work with attachments as files.
|
I guess we know which one is going to have to go then, huh? I'm keeping the attachment editor. :) Thanks Chen. :)
|
Really? I would expect you to keep the other hack, it seems more important to users that really need it.
|
It's really not as important to me as the flexibility of an editor, to tell you the truth. The option of being able to edit something on the fly instead of having to reupload it is much more important to me. And I have always gone by the philosophy that if I install a hack that causes problems with another one, that hack has got to go. :) I think the files in the db are more secure than having them on your server, anyway, aren't they? :) I'm sticking with what works.
Quote:
|
Quote:
Boofo the attachment on the server are very secure if you can place the directory above your www there is no way that anyone could get them from they're browser I think having the attachment as file is great especially down the track when you want to back up the db and you have 1000's of attachment :) immagine the file size of that ! anyhow go with what you like ;D Just my 2 cents Mone' |
You could be right about the security. I'm too new at all of this to know for sure. :)
As far as down the road on backing up goes, I don't have that much yet and I'm sure when it gets to the point that I would ever need it, someone will come up with a hack to extract attachments form the db for backing up purposes and then make it so they can re-insert them once the db is re-installed (unless they already have something like that and I missed it). The editor is something I will use more now. And also, this is the very first hack I have ever installed that caused another one to stop working completely. Can't be havin' that now, can we? ;) Quote:
|
hghjg
|
Chen,
Instead of having to clean the cache when we make an update to the file, is there any way to be able to look into the cache directory for that file and erase it first before we download (view) the updated one? Wouldn't that handle the cache problem? :) |
You can't look into the browser's computer with PHP. :)
|
Thanks, Chen, at least now I know not to look in that direction. How about CGI or HTML? In your opinion, can it be done with either one of those (before I start digging into it and finding out the same)? :)
Quote:
|
I don't think so, no.
|
It was worth a shot, anyway. Thanks. :)
Quote:
|
hmm, i was trying to fix the permission up becayse the way you have it, it lets any moderator, super moderator, admin and the one who posted it edit it, im trying to make it so it checks the users permission first and see if they are a moderator in the forum or have the editpost permission and if there the one that posted it, if there not, they cant see the edit link or edit the file but i cant seem to get it to work, i tried using this
PHP Code:
|
thats the only problem im having, after i get this fix, im gonna add a field in the admin options under attachments where you can specify what attachment files can be edited with it, like txt php nfo and so on
|
I'd be very interested in seeing it when you are done. :)
Quote:
|
Quote:
|
looking forward to it. Scott just got his Attachments as Files hack working with Chen's attachment editor, so you picked a good time to release it. :)
|
Quote:
|
You're way over my head on this one. :) I'll take your word for it. :)
|
All times are GMT. The time now is 02:46 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|