4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 Ad code
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
Kdawg
Senior WebHelper
Senior WebHelper


Joined: 21 Apr 2003
Posts: 153

PostPosted: Wed Jun 04, 2003 4:32 am (14 years, 6 months ago) Reply with QuoteBack to Top

Do you think I could use the ad code that you have for your forums here?
OfflineView User's ProfileFind all posts by KdawgSend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Wed Jun 04, 2003 8:06 am (14 years, 6 months ago) Reply with QuoteBack to Top

The basic answer is no, since the code is loosely based on a commercial product. Also, it's custom-coded for this site, and wouldn't easily work anywhere else. However this kind of project is a good way to get to grips with PHP & MySQL:
  • Study phpBB code in detail, and learn how to run SQL queries using phpBB's functions
  • Edit the phpbb_users table to add some extra fields for the advertisements
  • Create a redirection file for people clicking the links which will update the number of ad clicks in the database
  • Edit usercp_register.php to include the extra fields for ads (so that people can add/edit/delete their ads)


There's more, but that's all I can think of now Wink

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Kdawg
Senior WebHelper
Senior WebHelper


Joined: 21 Apr 2003
Posts: 153

PostPosted: Wed Jun 04, 2003 4:18 pm (14 years, 6 months ago) Reply with QuoteBack to Top

I'll work with it, I was starting to work with it anyway.
OfflineView User's ProfileFind all posts by KdawgSend Personal Message
Kdawg
Senior WebHelper
Senior WebHelper


Joined: 21 Apr 2003
Posts: 153

PostPosted: Wed Jun 04, 2003 4:29 pm (14 years, 6 months ago) Reply with QuoteBack to Top

How would I run PHP in the footer, doesn't it have to be named with the .php extension?
OfflineView User's ProfileFind all posts by KdawgSend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Wed Jun 04, 2003 5:06 pm (14 years, 6 months ago) Reply with QuoteBack to Top

page_tail.php is run after the page's content is generated, however you'd probably want your code run beforehand, so you'd want to put it in page_header.php. However I really don't think you can head straight into coding for phpBB: you have to understand the use of the database abstraction layer, and the templating system (this is especially important - you can't just echo() stuff out!).

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Kdawg
Senior WebHelper
Senior WebHelper


Joined: 21 Apr 2003
Posts: 153

PostPosted: Fri Jun 06, 2003 4:45 pm (14 years, 6 months ago) Reply with QuoteBack to Top

Where is page_header.php located?
OfflineView User's ProfileFind all posts by KdawgSend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Fri Jun 06, 2003 4:46 pm (14 years, 6 months ago) Reply with QuoteBack to Top

In the includes directory. However to be honest if you're asking such questions, you'll have great trouble actually completing such a modification (no offence intended).

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Kdawg
Senior WebHelper
Senior WebHelper


Joined: 21 Apr 2003
Posts: 153

PostPosted: Fri Jun 06, 2003 11:16 pm (14 years, 6 months ago) Reply with QuoteBack to Top

Thanks for the info, I got it set up how I want it. Its much less complicated than your system but it is what i want. Im going to enter the ads and its just going to be for my customers.
OfflineView User's ProfileFind all posts by KdawgSend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Sat Jun 07, 2003 9:16 am (14 years, 6 months ago) Reply with QuoteBack to Top

Ah, of course if you enter the ads yourself it does help to remove the complicated stuff Smile (entering data, checking it, and spitting it out again when it needs to be edited is a real pain Very Happy).

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.061845 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme