₦airaland Forum

Welcome, Guest: Join Nairaland / LOGIN! / Trending / Recent / New
Stats: 1,914,209 members, 3,921,293 topics. Date: Sunday, 19 November 2017 at 03:20 PM

Pls How Can I Achieve This With Php - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Pls How Can I Achieve This With Php (768 Views)

10 Nights Of Cloning Nairaland With PHP / What Can I Achieve With In Respect To Web Development C++ / If You Want To Learn Angularjs With Php..using XAMP ...why Not Join In Here (1) (2) (3) (4)

(0) (Reply) (Go Down)

Pls How Can I Achieve This With Php by AllyPolly: 6:53am On Sep 14
Good morning developers, i have a website in form of nairaland. , please how can i update the front page with links automatically without creating it manually again using the <a> tag manually ? Thanks
Re: Pls How Can I Achieve This With Php by trytillmake(m): 10:32am On Sep 14
Guy explain yrself well
Re: Pls How Can I Achieve This With Php by AllyPolly: 10:46am On Sep 14
trytillmake:
Guy explain yrself well
How can i push topics from their different sections to my front page like nairaland.
Do i av to create another link to d topic on my front page?
Do i get it
Re: Pls How Can I Achieve This With Php by AllyPolly: 10:47am On Sep 14
trytillmake:
Guy explain yrself well
Pls dnt mind my write up., i dnt knw a way of explaining it.

How can i push topics from their different sections to my front page like nairaland.
Do i av to create another link to d topic on my front page?
Do u get it
Re: Pls How Can I Achieve This With Php by Jenifa123: 1:15pm On Sep 14
You could create a push to front page button or link for admins and moderators and on ur sql for fetching posts to ur front-page there should be a where clause like select * from forums where front_page = '1' and when u or d moderators click on d button u created on each post it updates d table and set front_page on ur table to 1 for that particular post...

*Jenifa*

2 Likes

Re: Pls How Can I Achieve This With Php by trytillmake(m): 2:22pm On Sep 14
Jenifa123:
You could create a push to front page button or link for admins and moderators and on ur sql for fetching posts to ur front-page there should be a where clause like select * from forums where front_page = '1' and when u or d moderators click on d button u created on each post it updates d table and set front_page on ur table to 1 for that particular post...

*Jenifa*

Babes that Code I like and respect: ok back to OP just to support what @Jenifa has said u can

1. create a column on topics table called frontpage
2. add a checkbox called "to front" as topics as listed
3. each one u tick adds a number to frontpage column
4. frontage now selects from table where frontpage is not null; using c#
(var front = (from e in db.topics where frontpage == 1 select e).tolist;

u get the point

1 Like

Re: Pls How Can I Achieve This With Php by AllyPolly: 2:32pm On Sep 14
Jenifa123:
You could create a push to front page button or link for admins and moderators and on ur sql for fetching posts to ur front-page there should be a where clause like select * from forums where front_page = '1' and when u or d moderators click on d button u created on each post it updates d table and set front_page on ur table to 1 for that particular post...

*Jenifa*
Thanks for this..God bless u..will update u
Re: Pls How Can I Achieve This With Php by AllyPolly: 2:38pm On Sep 14
trytillmake:


Babes that Code I like and respect: ok back to OP just to support what @Jenifa has said u can

1. create a column on topics table called frontpage
2. add a checkbox called "to front" as topics as listed
3. each one u tick adds a number to frontpage column
4. frontage now selects from table where frontpage is not null; using c#
(var front = (from e in db.topics where frontpage == 1 select e).tolist;

u get the point
Thanks for this logic..but how can i make the latest topic i pushed to frontpage appear at the top of the list, since the front page sql code will be selecting all d topics with checkedbox at the same time?
Thanks.
Re: Pls How Can I Achieve This With Php by Jenifa123: 3:06pm On Sep 14
AllyPolly:

Thanks for this logic..but how can i make the latest topic i pushed to frontpage appear at the top of the list, since the front page sql code will be selecting all d topics with checkedbox at the same time?
Thanks.
That should be pretty simple
Once u click on d checkbox it not only sets a variable for front-page it should also update d time it was clicked so there should be a column called click_time or whatever you choose to name it...

So when you fetch it should be ordered by d click_time variable

*Jenifa*
Re: Pls How Can I Achieve This With Php by AllyPolly: 3:37pm On Sep 14
Jenifa123:

That should be pretty simple
Once u click on d checkbox it not only sets a variable for front-page it should also update d time it was clicked so there should be a column called click_time or whatever you choose to name it...

So when you fetch it should be ordered by d click_time variable

*Jenifa*
Wow ! Thank you !
Re: Pls How Can I Achieve This With Php by Jenifa123: 3:46pm On Sep 14
AllyPolly:

Wow ! Thank you !
Welcome i guess

*Jenifa*
Re: Pls How Can I Achieve This With Php by AllyPolly: 9:02am On Sep 17
Jenifa123:

Welcome i guess

*Jenifa*
Hello good morning.
I have been avin a tough time updating the frontpage status to "1" in my database, any code i attempt to use changes everything to 1, instead of the topic i specified using the "where" clause.
Please what can i do about this as all my efforts is nt working.
Pls can i contact u? Or i leave my detail here

Re: Pls How Can I Achieve This With Php by ademakanak(m): 9:26pm On Sep 18
Drop your WhatsApp let's look at it together
Re: Pls How Can I Achieve This With Php by AllyPolly: 10:58pm On Sep 18
ademakanak:
Drop your WhatsApp let's look at it together
0816four3820seven5, thanks bro
Re: Pls How Can I Achieve This With Php by Jenifa123: 9:26am On Sep 19
AllyPolly:

Hello good morning.
I have been avin a tough time updating the frontpage status to "1" in my database, any code i attempt to use changes everything to 1, instead of the topic i specified using the "where" clause.
Please what can i do about this as all my efforts is nt working.
Pls can i contact u? Or i leave my detail here
Sorry for the late response I hardly have time since i've been working on my website...

Well it's pretty obvious the whole table updates due to an error in ur query...
If it's quite hard to rectify do this..
Click on d post to open

Then on a particular post let d form be there to push dat particular topic to front-page
Re: Pls How Can I Achieve This With Php by AllyPolly: 9:32am On Sep 19
Jenifa123:

Sorry for the late response I hardly have time since i've been working on my website...

Well it's pretty obvious the whole table updates due to an error in ur query...
If it's quite hard to rectify do this..
Click on d post to open

Then on a particular post let d form be there to push dat particular topic to front-page
Ok, i will try this out. Tnks

Modified : it is now working., there was an error im d query i overlooked, i got the previous one working also.
Tnk u
Re: Pls How Can I Achieve This With Php by ncpat(m): 7:11am On Sep 21
I'm not a programmer or web developer but I believe I can solve this issues using Google, that is what I have been using to cheat most developers, now let me give you a clue, install a phpbb forum script on your system or server, there is this plugin called recent topic, it does exactly what you are looking for, find and install it and take a look of how it was written and how it works so that you can implement same on your site.
Re: Pls How Can I Achieve This With Php by AllyPolly: 6:01pm On Sep 21
ncpat:
I'm not a programmer or web developer but I believe I can solve this issues using Google, that is what I have been using to cheat most developers, now let me give you a clue, install a phpbb forum script on your system or server, there is this plugin called recent topic, it does exactly what you are looking for, find and install it and take a look of how it was written and how it works so that you can implement same on your site.
Tnks bro .. Will check it out,

(0) (Reply)

Programmers Need A Laptop / Visual Basic Programming Code / Microsoft Office Home And Student 2010 Product Key

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (0) (1) (2) (3) (4) (5) (6) (7) (8) (9)

Nairaland - Copyright © 2005 - 2017 Oluwaseun Osewa. All rights reserved. See How To Advertise. 79
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.