Search found 3234 matches

by jacek
Sun Jun 28, 2015 8:04 pm
Forum: General Chat
Topic: Questions and things regarding rebooting the activity here.
Replies: 22
Views: 10216

Re: Questions and things regarding rebooting the activity he

I had the same dilemma and went for the "mark as read" option. It is worth replying to them since people find the posts from searches. There are far too many posts to go through though so I decided to focus on the recent/new ones for now and maybe go back a few pages and reply to some inte...
by jacek
Sun Jun 28, 2015 7:59 pm
Forum: General Chat
Topic: jacek
Replies: 20
Views: 9626

Re: jacek

So that mass mail thing did actually send then :) You would not believe the state of my inbox now from all the bounce back messages :P The was the same thing that kept me away too to be honest, for some reason I never really thought of cleaning up the mess from the database backend. I'll hopefully g...
by jacek
Sun Jun 28, 2015 7:29 pm
Forum: PHP
Topic: Showing only number
Replies: 4
Views: 2128

Re: Showing only number

You want to use round() on the profit [syntax=php]round($row['profit'])[/syntax] if that doesn't work can you post the code that you tried and the error it gave? In one example you multiply profit by ulog and in the other you don't. Could that be something to do with it? It might help to print out t...
by jacek
Wed Jun 17, 2015 8:27 pm
Forum: PHP
Topic: Showing only number
Replies: 4
Views: 2128

Re: Showing only number

I want to display only 343 and .34 to be hidden, how can i do that? Hidden from the main page, not in the phpmyadmin table. :D To make it show only the whole number part you can use round () [syntax=php]echo round(343.34);[/syntax] will output 343 For the other problem can you post a bit more of th...
by jacek
Wed Jun 17, 2015 8:08 pm
Forum: Premium Items
Topic: blank page after login to link_tracker
Replies: 3
Views: 2128

Re: blank page after login to link_tracker

Ah, password_verify was only added in php 5.5.0 so the only thing you can do is update.
The version you have is not supported any more so it's probably a good idea anyway.
by jacek
Mon Jun 15, 2015 9:49 pm
Forum: PHP
Topic: Limit to 1 post per day
Replies: 19
Views: 9385

Re: Limit to 1 post per day

That's great news :) The code only checks for how many posts have been posted since 1 day ago. So it will include any that are in the future as well. You could change it a bit to ignore future ones by adding a new condition [syntax=sql]SELECT COUNT(1) FROM `clanovi_njihovi_parovi` WHERE `racun` = {$...
by jacek
Sun Jun 14, 2015 12:20 pm
Forum: PHP
Topic: Limit to 1 post per day
Replies: 19
Views: 9385

Re: Limit to 1 post per day

Oh sorry. Okay so which part are you stuck with at the moment? Maybe if we break it down a bit it will make more sense.
by jacek
Tue May 26, 2015 8:41 pm
Forum: PHP
Topic: Limit to 1 post per day
Replies: 19
Views: 9385

Re: Limit to 1 post per day

Compile it? PHP scripts are not compiled, they just run each time the page gets loaded.
by jacek
Tue May 26, 2015 8:40 pm
Forum: Premium Items
Topic: blank page after login to link_tracker
Replies: 3
Views: 2128

Re: blank page after login to link_tracker

Hey, sorry for the delay.

A blank page normally means there is an error that's being hidden.

Try setting
display_errors = On
and
error_reporting = E_ALL & ~E_STRICT
in your PHP config and see if it shows anything up.
by jacek
Thu Apr 23, 2015 9:07 pm
Forum: Tutorials
Topic: Delete posts/comments in Blog
Replies: 4
Views: 1829

Re: Delete posts/comments in Blog

Glad you got it working, and thanks for sharing the solution :)
by jacek
Tue Apr 14, 2015 10:17 pm
Forum: Other
Topic: Help with ASP and AJAX
Replies: 1
Views: 2237

Re: Help with ASP and AJAX

I'm not a huge expert in ASP but if you're just getting no results and not an error then it's probably something to do with the request. I'd start by checking the value of the str variable in JavaScript and the name variable in ASP. Also some general JavaScript debugging advice; the console tab in d...
by jacek
Fri Mar 27, 2015 7:32 pm
Forum: PHP
Topic: Limit to 1 post per day
Replies: 19
Views: 9385

Re: Limit to 1 post per day

I'm not sure what some of those word mean but you need to do a check using the query I posted above. Perhaps something like this $result = mysql_query("SELECT COUNT(1) FROM `clanovi_njihovi_parovi` WHERE `racun` = {$racun} AND `datum` > DATE_SUB(NOW(), INTERVAL 1 DAY)"); $row = mysql_fetch...
by jacek
Sun Mar 22, 2015 4:33 pm
Forum: Code
Topic: [Function] Universal Embed
Replies: 3
Views: 2814

Re: [Function] Universal Embed

Looks cool, thanks for sharing :)
by jacek
Sun Mar 22, 2015 4:31 pm
Forum: PHP
Topic: Limit to 1 post per day
Replies: 19
Views: 9385

Re: Limit to 1 post per day

I'm not totally sure I understand the problem but you can get the number of posts a user has made in the last 24 hours using something like this.
SELECT COUNT(1) FROM `posts` WHERE `user_id` = ? AND `post_time` > DATE_SUB(NOW(), INTERVAL 1 DAY)
by jacek
Sat Feb 28, 2015 5:46 pm
Forum: Premium Items
Topic: link_tracker
Replies: 3
Views: 2264

Re: link_tracker

That normally means there is something missing from your server config. Can you check the Apache logs and see if it says what's wrong.

If you are using a webhost provider it might be that they are blocking connections to the web.
by jacek
Mon Feb 02, 2015 9:41 pm
Forum: Tutorials
Topic: Delete posts/comments in Blog
Replies: 4
Views: 1829

Re: Delete posts/comments in Blog

The first thing to do would be to create a function that deletes a post given it's ID function delete_post($post_id){ // stuff! } The basic command you want to use is an SQL DELETE DELETE FROM `posts` WHERE `post_id` = 10; would remove post 10 for example. That should give you a nudge in the right d...
by jacek
Mon Feb 02, 2015 8:52 pm
Forum: General Chat
Topic: jacek
Replies: 20
Views: 9626

Re: jacek

The spam accounts have now been cleared up with the help of some clever SQL. Ban all users that made a post today INSERT INTO `phpbb_banlist` (`ban_userid`, `ban_start`, `ban_reason`, `ban_give_reason`) SELECT `user_id`, UNIX_TIMESTAMP(), 'Spambot', 'Spambot' FROM `phpbb_users` WHERE `user_id` IN (S...
by jacek
Sun Feb 01, 2015 10:42 pm
Forum: General Chat
Topic: jacek
Replies: 20
Views: 9626

Re: jacek

I'm okay!

I basically had no time for anything fun for the last few years.

Normal service will (attempt) to resume once the forum has been tidied up :)
by jacek
Mon Jun 10, 2013 12:18 am
Forum: General Chat
Topic: I would just like to thank you all
Replies: 4
Views: 4319

Re: I would just like to thank you all

:D very nice to hear that. I think it's one of the advantages of a small community that people are generally nicer :P
by jacek
Wed Jun 05, 2013 6:43 pm
Forum: Introductions
Topic: Hello everyone =)
Replies: 2
Views: 18473

Re: Hello everyone =)

Welcome :) Sounds like you started pretty much how I did :P
by jacek
Wed May 29, 2013 9:28 am
Forum: General Chat
Topic: Classes
Replies: 3
Views: 5723

Re: Classes

One advantage is the way you can store data in the instance of an object. For example the forum system I'm working on has a post class and a topic class. The topic class has a method to gets all of the posts on page X, this returns an array of post objects. The post class has methods to access the i...