Welcome Guest, Not a member yet? Register   Sign In
A few issues:
#1

[eluser]iainco[/eluser]
Hi everyone,

I'm working on a news aggregator/social networking idea project just now, specifically the admin side of things where authorised users can add/edit records.

I was thinking, instead of coding it all myself when CI's scaffolding does pretty much everything I need, how would I go about using scaffolding but securing it better than just the scaffolding trigger.


The next issue I have is that the site must be able to display adverts (and include management for adverts)... but the problem I'm thinking is how to go about knowing how much to charge a company if a "pay per click option" is in place, and how to show all adverts evenly, so that one company doesn't get more advertising time than another. Does this make sense?


Thanks for any advice
#2

[eluser]bastones[/eluser]
You could do it based on "up to x amount of clicks per month", and for every click you add +1 to the database. I guess there's no even way of doing that but in the meanwhile you can use the rand() PHP function to randomise which ads are being displayed such as:

Code:
<?php
$i=rand(1,5); // 1,3,1,2,5 etc
echo $i;
?>
#3

[eluser]iainco[/eluser]
Thanks for your reply bastones, I did think about using the random function, but that means that there is the potential for one ad to be displayed more than others because it is random...

I was thinking about doing it by days, working out, based on how many companies wish to advertise, and showing them daily but ensuring no ad is on show for longer than another and that all ads get a chance of being shown for durations that are busier than others.
#4

[eluser]bastones[/eluser]
[quote author="Chels87" date="1226346234"]Thanks for your reply bastones, I did think about using the random function, but that means that there is the potential for one ad to be displayed more than others because it is random...

I was thinking about doing it by days, working out, based on how many companies wish to advertise, and showing them daily but ensuring no ad is on show for longer than another and that all ads get a chance of being shown for durations that are busier than others.[/quote]

I guess you can use the rand() function again but add +1 to the database for every view, and if it hits 100k or something, add 1 to a field 'disallow' that removes the ad from being shown should the limit be hit. You could just ask them to pay you based on clicks, as its much more trustworthy Smile.




Theme © iAndrew 2016 - Forum software by © MyBB