Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Vraxor

Pages: 1 [2] 3 4 5 6
16
Mods & Plugins (Requests & Discussions) / Banner rotation
« on: January 08, 2003, 12:21:28 PM »
interesting question, I don't know if there is someone who already did something like that, but I would be interested.

Cheers,
Vraxor

17
Installation, Update & Configuration / NetPBM binaries
« on: January 07, 2003, 09:07:35 AM »
I have no idea if that is the correct version for your server, but if it matches your servers specs I guess it is.

I don't know what you did already, but as far as I know you only have to upload the binaries to a folder somewhere at your webserver, make it a folder called NetPBM for instance, and make sure that folder and all the files inside are CHmoded 777

Then link to that folder in the settings menu of 4images and it should work, there is no further installation needed as far as I know.

Cheers,
Vraxor

18
Installation, Update & Configuration / more new images in main index?
« on: January 07, 2003, 09:02:13 AM »
Hi,

open index.php and change
Code: [Select]
$num_new_images = $config['image_cells'];


to

Code: [Select]
$num_new_images = 9;

Cheers,
Vraxor

19
Mods & Plugins (Releases & Support) / Integration 4images 1.7 / phpBB
« on: January 06, 2003, 10:14:07 AM »
Hi Jan,

yes, I already have a Forum with member, but that does not matter. I am taking a close look at both tables and have the following in mind.
I don't care about losing the users of the forum as most users of the forum are also member of the galleries, just can't lose the images.

So what is it I plan on doing:

1. I add all missing collums to the users table of 4images so that the table structure is the same as the one of the forum.
2. I change all user levels of the members to 0 instead of 2, otherwise all members would become moderator  :wink:
3. I dumb the users table of the forum and rename the users table of 4images to the the old name of the forum users table.

I think that this should do the job, but I'm not certain. Maybe I overlook something, but I will give it a try. I plan on doing this whole move somewhere next week, this week I will make all preperations like informing all members about it.

So right now my question is basicly, is the idea I described above possible?

I also saw that you changed the sessions table to the sessions table of the forum. I don't know anything about sessions so is it necasary to copy the sessions table as well?

Cheers,
Vraxor

20
Installation, Update & Configuration / Datenbank host?
« on: January 06, 2003, 09:39:19 AM »
If localhost does not work I'd suggest to use the ip of the server that hosts the database.

Note that I have no experience with this at all, so I really don't know if this will work, but just try and let me know if it works or not.

Cheers,
Vraxor

21
Templates & Styles (Requests & Discussions) / Adding more pages?
« on: January 06, 2003, 07:32:42 AM »
I think this would do it

I was just curious so I tried it using http://madfunny.com/index.php?template=contact

it looks fine too, me so..

Cheers,
Vraxor

22
Mods & Plugins (Releases & Support) / Integration 4images 1.7 / phpBB
« on: January 05, 2003, 10:47:23 PM »
Ok, I have a question.

I have too many members and images in my galleries too lose, but still I would like to integrate with the forum. I think this is a question many people have.

Now I think about manually copying all members from the user table of 4images to the user table of the forum. Is this possible and is there anything I should keep in mind.

I don't know what this integration is going to do, so which user table is used after the integration, or are they both used, what about table prefixes?

Could anybody shine a little light as I would like to do the integration, even if it means that I have to convert the tables by hand, just tell me how.

Cheers,
Vraxor

23
Hi intuitiv,

did you fix the error already as I do not see one?

Cheers,
Vraxor

24
NO sorry, Hunter, I don't really understand that either, but maybe somebody else does. It aint a problem for me though.

Cheers,
Vraxor

25
Discussion & Troubleshooting / upload problem...
« on: January 01, 2003, 02:55:25 AM »
please search the forum, there are lots of descutions about this problem.
also take a look here:
http://4homepages.de/forum/viewtopic.php?t=2296

26
Mods & Plugins (Requests & Discussions) / Curently registered
« on: December 31, 2002, 02:40:12 PM »
hmm, I did not edit/Modify the Who's online dfeature, thats a whole different thingy as it is already implemented in 4Images.

simply use the {whos_online} tag in you templates and make sure the you call the whos_online template in your index.php, but that is also already done by default.

Cheers,
Vraxor

27
Mods & Plugins (Requests & Discussions) / Curently registered
« on: December 31, 2002, 12:44:31 PM »
Hi Edwin,

I wrote a MOD about that as many people asked me how I did that.

so please take a look here:
http://www.4homepages.de/forum/viewtopic.php?t=3303

good luck,
Vraxor

28
ok, fixed.

Good to hear you like it.

29
Hi all,

I did already forgot about this little modification I did. I was in fact the first little mod I did ever in PHP.

The idea is to show more statistics then the number of images and categories (which are shown by default).
This MOD will show:
- Number of Members
- Number of Image Votes
- Number of Image Hits
- Number of Image Comments
- Number of Image Downloads

All these are shown on totals, so it shows the total number of image hits over all images. You can see an example of it here: http://haunter.student.utwente.nl/Terrarevolution/galleries/index.php

// Ok, now lets get started

Creating the stats.php file
Make a new file called: stats.php
Save this empty file in the includes folder of 4images
Open stats.php with any code editor you like.

and copy past the following to your stats.php:
Code: [Select]
<?PHP

//-----------------------------------------------------
//--- Show number of Users ----------------------------
//-----------------------------------------------------
   $sql = "SELECT COUNT(*) as users
          FROM ".USERS_TABLE."
          WHERE user_id <> ".GUEST;
  $row = $site_db->query_firstrow($sql);

  $total_users = "".$lang['users']."<B> ".$row['users']."</B>\n";
 
  $site_template->register_vars("total_users", $total_users);
unset($total_users);

//-----------------------------------------------------
//--- Hits --------------------------------------------
//-----------------------------------------------------
$sql = "SELECT SUM(image_hits) AS sum
          FROM ".IMAGES_TABLE;
  $row = $site_db->query_firstrow($sql);

  $sum = (isset($row['sum'])) ? $row['sum'] : 0;
  $total_hits = "".$lang['total_hits']."<B> ".$row['sum']."</B>\n";
 
  $site_template->register_vars("total_hits", $total_hits);
unset($total_hits);

//-----------------------------------------------------
//--- Votes -------------------------------------------
//-----------------------------------------------------
$sql = "SELECT SUM(image_votes) AS sum
          FROM ".IMAGES_TABLE;
  $row = $site_db->query_firstrow($sql);

  $sum = (isset($row['sum'])) ? $row['sum'] : 0;
  $total_votes = "".$lang['total_votes']."<B> ".$row['sum']."</B>\n";
 
  $site_template->register_vars("total_votes", $total_votes);
unset($total_votes);

//-----------------------------------------------------
//--- Downloads ---------------------------------------
//-----------------------------------------------------
$sql = "SELECT SUM(image_downloads) AS sum
          FROM ".IMAGES_TABLE;
  $row = $site_db->query_firstrow($sql);

  $sum = (isset($row['sum'])) ? $row['sum'] : 0;
  $total_downloads = "".$lang['total_downloads']."<B> ".$row['sum']."</B>\n";
 
  $site_template->register_vars("total_downloads", $total_downloads);
unset($total_downloads);

//-----------------------------------------------------
//--- Comments ----------------------------------------
//-----------------------------------------------------
$sql = "SELECT SUM(image_comments) AS sum
          FROM ".IMAGES_TABLE;
  $row = $site_db->query_firstrow($sql);

  $sum = (isset($row['sum'])) ? $row['sum'] : 0;
  $total_comments = "".$lang['total_comments']."<B> ".$row['sum']."</B>\n";
 
  $site_template->register_vars("total_comments", $total_comments);
unset($total_comments);
?>


Now save the stats.php file.

ALWAYS BACKUP: any file you start editing as you might not be able to restore it when the mod doesn't work

Adding the statistics to the language files:

*NOTE* I only edited this in English, but you will have to copy this to any language you use and maybe translate the english.

Open the main.php file from the lang/[your language] folder of 4images.

Go all the way to the bottom of the file.

Find:
Code: [Select]
//-----------------------------------------------------
//--- Admin Links -------------------------------------
//-----------------------------------------------------
$lang['edit'] = "[Edit]";
$lang['delete'] = "[Delete]";


Add Before:
Code: [Select]
//-----------------------------------------------------
//--- Statistics --------------------------------------
//-----------------------------------------------------
$lang['users'] = "Total Members:";
$lang['total_hits'] = "Total Image Hits:";
$lang['total_votes'] = "Total Image Votes:";
$lang['total_downloads'] = "Total Image Downloads:";
$lang['total_comments'] = "Total Image Comments:";


Including the statistics in Index.php:

Open index.php in the root folder of 4images with any code editor you like.

Find:
Code: [Select]
require(ROOT_PATH.'includes/sessions.php');

Add after:
Code: [Select]
include(ROOT_PATH.'includes/stats.php');

Do the same for catergories.php, lightbox.php, top.php
(it might also work in memberlist.php, search.php, register.php etc. but I did not test them yet)

Now edit the template files that correspond with the php files you added the include to.

index.php = home.html
categories.php = categories.html
lightbox.php = lightbox.html
top.php = top.html

you can find the templates inside the templates/default folder of 4images.

In the templates you can now use the following tags:

{total_users} - This will show the total number of members
{total_votes} - This will show the total number of image votes
{total_comments} - This will show the total number of image comments
{total_hits} - This will show the total number of image hits
{total_downloads} - This will show the total number of image downloads

Uploading all the edited files:

Now upload all files you editted to the right folder at your webserver.

This is a list of files you need to upload:
./index.php
./categories.php
./lightbox.php
./top.php
./includes/stats.php
./lang/ (any language you editted) /main.php
./templates/ (any templates you editted) /home.html
./templates/ (any templates you editted) /categories.html
./templates/ (any templates you editted) /lightbox.html
./templates/ (any templates you editted) /top.html

of course if you editted any more files then the once I mentioned above, you will need to upload them too.

I think this is it. Please note that it could be that I made an error somewhere in the directions above. As soon as you notice any error, please let me know and I will correct it as soon as possible.

Enjoy this little mod!!!

Cheers,
Vraxor

30
With mods like these you surely make my Christmas a lot better. I will surely test it out as soon as possible and let you know if it worked.

Thanks for posting and have a nice Christmas,
Vraxor

Pages: 1 [2] 3 4 5 6