View Full Version : hello i need a vb hack
DataVampire
12-17-2004, 11:46 PM
hello this applys to all vbcoders im in need of a few vb hack's
the images ss1 and ss2 and ss4 are the same hack....
(1.) i need these hacks to be able to list only the user's uploaded Attachments
so when a user looks at the users profile there would be the button to be clicked on and any one of any of the members on my site can look at all the users files. i would like this hack to be a pop up in a java script that will list all the users files in example image ss4
in image ss2 when a user Post New Thread or any thing else like reply ect the members can click on the image called viewmyfiles and the same thing happens a pop up window pop's up and it would look some thing like in image ss4
the image is ss3
(2.) In this hack i would like to be able to show all members the total amount of uploaded files on the forum in the stats area like in image ss3....
well i hope any one can do these hacks for me as i really need these hacks very bad please add me to msn messenger ps2_xbox@hotmail.com
thanks very much i would like to be able to get these hacks soon and i would pay for these hacks as well
ericgtr
12-18-2004, 01:40 AM
I got your PM and I will take a look at doing this for you as time permits, I need some of it for myself anyway.
DataVampire
12-18-2004, 06:32 AM
is there any other members that can help on this hack ? please help
ericgtr
12-18-2004, 02:37 PM
I am working on the first screenshot you posted, I almost have it complete but the query for attachment views today is proving to be a little tough. I will work on it some more on Sunday though. The other stuff should be pretty easy using the existing file browser mod and making a couple of tweaks, I don't know about all the popup windows though, it may be more than I want take on personally but I will make it work within the normal windows.
Also, if nobody else completes it before I do I will post it all up for anyone who wants it. :)
DataVampire
12-18-2004, 10:58 PM
well thanks if u cant do the pop up window the if you can make a template for it.. but make sure the hack works on user id and all i want the hack to be able to on list the uploads (Attachments) that the users have upload to the server (my server)
ericgtr
12-18-2004, 11:09 PM
It's just about complete, I just need to be sure that my query for the "Total downloads today" is correct. It will also incorporate an existing file attachment mod, no point in reinventing it since it already exists. Once I get his buy off I will release it in the beta section and bump this post, I have all the instructions ready to go.
lasto
12-18-2004, 11:16 PM
wow nice one m8 will keep eye out for this
ericgtr
12-18-2004, 11:37 PM
Actually, I can't release this until I get this query right. What it's supposed to do is grab how many times a file has been downloaded in the last 24 hours. If any of you guru's can help with this that would be great. As it is, I have nothing to compare it with but I can tell that it's parsing out the wrong numbers because it's declining as the day goes on.
$todays_views = $DB_site->query_first('
SELECT COUNT(*) AS count
FROM ' . TABLE_PREFIX . 'attachment
WHERE dateline >= "' . strtotime("-1day") . '"
');
$newhits = number_format($todays_views ['count']);
ericgtr
12-19-2004, 04:14 PM
Okay, I have done about all I can with this mod so I will release what I have and if anyone else wants to finish it up, feel free. Special thanks goes to x3n0 for his gallery mod.
In order of screenshots posted, here's how they are addressed:
SS3:
This is setup only for Total files on server, it is in it's own collapsable table. I am not able to come up with the right query for adding a time table to the attachmentviews table to get a result of the last 24 hours. Special thanks to x3n0 for pointing me in the right direction but it's too far over my head.
SS2 and SS1:
This is done with the help of x3n0's mod https://vborg.vbsupport.ru/showthread.php?t=68419&highlight=gallery.php and is covered in the istructions.txt file.
SS4:
This can be done using CarCdr's Attachment Browser (https://vborg.vbsupport.ru/showthread.php?t=66800&highlight=attachment) mod.
lasto
12-19-2004, 05:26 PM
installs fine that m8 but it dont give list of how much the attachments uses.
Installed all 3 hacks all work fine - except on forumhome in the box all it says is
Total files on the server: 9
ericgtr
12-19-2004, 06:21 PM
Hmm.. are you sure there are more than 9 attachments? I checked it against the stats and it matched up as it should.
DataVampire
12-19-2004, 07:32 PM
nice work ill make some edit's to make it look like what i was really wanting to look like but there is a few other things that are missing the total downloads of the day in the forum home item
ericgtr
12-19-2004, 07:39 PM
nice work ill make some edit's to make it look like what i was really wanting to look like but there is a few other things that are missing the total downloads of the day in the forum home item
Correct, I can't get that part right, pleaes read my post above over again.
DataVampire
12-19-2004, 07:43 PM
the gellary hack that u posted to work with the other hack dose not show any images for the attched files to the users name this is not what i was wanting i was hopeing for a template of its own
and this i dont want to show any thumbnails
<div style="font-size:18pt">$userinfo[musername]<a href="gallery.php?userid=$post[userid]&pp=10&showthumbs=1" target="new"><img class="inlineimg" src="$stylevar[imgdir_button]/myfiles.gif" alt="<phrase 1="$post[username]">$vbphrase[gallery]</phrase>" border="0" /></a> </div>
can this be removed from the gallary script you posted
ericgtr
12-19-2004, 08:18 PM
As long as the showthumbs=1 (not=0) par of this URL, it should display them, it does on my site.
<div style="font-size:18pt">$userinfo[musername]<a href="gallery.php?userid=$post[userid]&pp=10&showthumbs=1" target="new"><img class="inlineimg" src="$stylevar[imgdir_button]/gallery.gif" alt="<phrase 1="$post[username]">$vbphrase[gallery]</phrase>" border="0" /></a> </div>
lasto
12-19-2004, 08:45 PM
lo m8 yes there is only 9 on my board - but thats fine what i wanted to know though is that all is meant to be shown on index.php page - no other stats show
Total files on the server: 9
ericgtr
12-19-2004, 09:09 PM
lo m8 yes there is only 9 on my board - but thats fine what i wanted to know though is that all is meant to be shown on index.php page - no other stats show
Total files on the server: 9
That's right, he requested it that way but you can put this part in the existing stats box and remove the new one, it does seem a little much for one statement.
$vbphrase[server_attach_total]: $total_attach[count]
lasto
12-20-2004, 04:21 PM
it works fien this hack but one thing puzzles me - is it meant to show on forum home the space the attachements take up as for me it only shows total files
reason i ask is because of this querie in forumhome template
$vbphrase[server_attach_total]: $total_attach[count]
i presume the first one will be how much space they all take up and the second one how many attachments there actually is - if this is the case then ive done the hack but only the last one shows up which is $total_attach[count]
ericgtr
12-20-2004, 04:48 PM
It is only supposed to show the total (count) of attachments you have stored. Anything following $vbphrase is being pulled from the phrases, which we added and is only meant to parse out the phrase "Total files on server". The $total_attach[count] is the variable called from the forumhome tempate to index.php, parsing out the query we've placed in the index.php. Hope this makes a little sense.
lasto
12-20-2004, 04:55 PM
is there anychance though then it could pull out how much the attachments take up ?
I know its there in the other hack listed above - the attachement browser hack but how do i pull it from there so it goes in the same box as the total files ?
so it looks like this -
Total attachements on Server 9 : using 0.2meg or something along them lines :)
ericgtr
12-20-2004, 06:20 PM
Okay, here you go. I pulled some of this info from the statistics mod and made it work with this.
In index.php find this: (I know I always use this section but it's the best place)
// ### ALL DONE! SPIT OUT THE HTML AND LET'S GET OUTA HERE... ###
Above it add:
//Total Space Used
$total_hits = $DB_site->query_first("
SELECT COUNT(*) AS attaches
FROM " . TABLE_PREFIX . "attachment
");
$total_hits = intval($total_hits ['attaches']);
$total_hits2 = $DB_site->query_first("
SELECT SUM(filesize) AS size
FROM " . TABLE_PREFIX . "attachment
");
$total_hits2_in_kb =@substr($total_hits2['size']/1024,0,7); // Attachments in KB
$total_hits2_in_mb =@substr($total_hits2['size']/1048576,0,4); // Attachments in MB
//Total Space Used
If you are using the mod here then use this
In FORUMHOME template find:
<div>$vbphrase[server_attach_total]: $total_attach[count]<br />
Add below:
Memory used by Attachments:
$total_hits2_in_kb kb ($total_hits2_in_mb mb)
If you want to add it to your current stats use this
In FORUMHOME template find:
<div><phrase 1="member.php?$session[sessionurl]u=$newuserid" 2="$newusername">$vbphrase[welcome_to_our_newest_member_x]</phrase></div>
<br />
Add below:
Memory used by Attachments:
$total_hits2_in_kb kb ($total_hits2_in_mb mb)
Just discovered the php tag, sweet! :D
lasto
12-20-2004, 06:34 PM
nice one m8 and thanks for help on this :)
ericgtr
12-20-2004, 08:15 PM
I think I may be on to something here, I have decided that since there is a new table for that stats on the forum home that I would try to fill it up. I think I may have even figured out how to get how many downloads from the last 24 hours. Have a look at the screenshot.
lasto
12-20-2004, 08:21 PM
keep it up m8
* lasto bookmarks this thread :)
ericgtr
12-20-2004, 08:31 PM
keep it up m8
* lasto bookmarks this thread :)
Tell you what I'll do. I will watch the stats for the downloaded in the last 24 hours and if it appears to be correct by tomorrow (resets it'self correctly) then I will consider it right. Like I said, I have nothing to compare it to so I will have to watch it to see.
Once that's done I will release the attachment stats box as a modification. Most of this can be done with other stats mods though, this will just be independent and display on the forumhome.
DataVampire
12-20-2004, 09:45 PM
good work bro but just one thing the view my files hacks need to have its own template and work on its own to look more like this one here
https://vborg.vbsupport.ru/attachment.php?attachmentid=22422
also there is still the need of total downloads of the day
but i just wanna say good work
ericgtr
12-20-2004, 10:23 PM
good work bro but just one thing the view my files hacks need to have its own template and work on its own to look more like this one here
https://vborg.vbsupport.ru/attachment.php?attachmentid=22422
also there is still the need of total downloads of the day
but i just wanna say good work
About the total downloads of the day, we gotta get you to read through my posts all the way ;)
I will work on the template to format it for the look you want, it pretty much does it now as it is thought.
lasto
12-21-2004, 07:16 PM
did it reset after 24 hrs m8 ?
ericgtr
12-21-2004, 08:45 PM
did it reset after 24 hrs m8 ?
It didn't workout, I have figured out how to add a query to the attachemntviews table to time stamp it though, I am working that out today. :)
DataVampire
12-21-2004, 10:11 PM
I think I may be on to something here, I have decided that since there is a new table for that stats on the forum home that I would try to fill it up. I think I may have even figured out how to get how many downloads from the last 24 hours. Have a look at the screenshot.
I see u have put an other item to the vb hack that i do like my self..
the part that says " Total Downoads: ????? " i would like to know the code for that little item ?
i also see that the refresh did not work on the " Total Downloaded Today: ???? "
im sure it will work out for you soon enough but the other part i would like to use on my site so when i start my new site it will be fresh :nervous:
ericgtr
12-21-2004, 10:40 PM
Actually the Total Downloaded Today is working correctly now (I am pretty sure) you probably looked while I was mucking with the database, I cleared and readded the table a few times for testing. :) I will also add the Total Downoads: part as well.
ericgtr
12-21-2004, 11:44 PM
Okay, this is now released here https://vborg.vbsupport.ru/showthread.php?p=584900#post584900
DataVampire, I sent you a PM about the template, hopefully he can help you out.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.