Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,151 members, 7,818,473 topics. Date: Sunday, 05 May 2024 at 04:39 PM

How Does Nairalnad Fronpage Works - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / How Does Nairalnad Fronpage Works (960 Views)

What Is Cloud Hosting: How Does It Really Work? / To All Gurus, How Does Buying 2go Gocredit With Sms Works / How Does Websites Like OLX. Etc Make Money? (2) (3) (4)

(1) (Reply) (Go Down)

How Does Nairalnad Fronpage Works by maekhel(m): 11:14am On Dec 25, 2014
Merry Xmas fellow webmasters, please I will like to know nairaland frontpage works. I mean how is the moving thread to frontpage works, am currently working on a project that needs that frontpage feature. Please anybody that knows about this should comment.
Re: How Does Nairalnad Fronpage Works by Raiders: 11:18am On Dec 25, 2014
Contact the moderator in the section you upload your topic. If its a good topic I believe it would be move to the front page
Re: How Does Nairalnad Fronpage Works by maekhel(m): 11:21am On Dec 25, 2014
Raiders:
Contact the moderator in the section you upload your topic. If its a good topic I believe it would be move to the front page
Thanks fr the reply, am nt asking fr my post to be moved to frontpage, but want to know how it works so I can implement it on my project.
Re: How Does Nairalnad Fronpage Works by GodMode: 12:09pm On Dec 25, 2014
maekhel:

Thanks fr the reply, am nt asking fr my post to be moved to frontpage, but want to know how it works so I can implement it on my project.

My guess is:

-NL has a file called "frontpage" or "featured".
-NL has a database table called "frontpage" or "featured".
-NL uses sql to insert and/or update the "frontpage" table...

Your knowledge of sql will help u achieve this cos u'll have to "join" posts into the frontpage table.

Note: I'm just guessing.

2 Likes

Re: How Does Nairalnad Fronpage Works by onyengbu: 12:50pm On Dec 25, 2014
maekhel:

Thanks fr the reply, am nt asking fr my post to be moved to frontpage, but want to know how it works so I can implement it on my project.
I have done that stuff over and over again. Heres how it work:

1. you have a table named "frontpage" which is joined by the field "id_topic" for e.g referencing the "id" of the "topics" table.

2. You then have an admin accessible only "move to frontpage" link/button on each topic and if a topic is frontpage-worthy, click on this link and it takes you to a page or just lauch a modal where you will have the topic title in a text box. You can now modify the title the way you want it to appear on the frontpage. you can also have the link to the topic in another text box so you can modify it to add a permalink to a specific post on the thread.

3. When you are done, submit this to your frontpage table.

**** You can also place other fields in the frontpage table to control sticky et all.

3 Likes

Re: How Does Nairalnad Fronpage Works by maekhel(m): 12:56pm On Dec 25, 2014
onyengbu:

I have done that stuff over and over again. Heres how it work:

1. you have a table named "frontpage" which is joined by the field "id_topic" for e.g referencing the "id" of the "topics" table.

2. You then have an admin accessible only "move to frontpage" link/button on each topic and if a topic is frontpage-worthy, click on this link and it takes you to a page or just lauch a modal where you will have the topic title in a text box. You can now modify the title the way you want it to appear on the frontpage. you can also have the link to the topic in another text box so you can modify it to add a permalink to a specific post on the thread.

3. When you are done, submit this to your frontpage table.

**** You can also place other fields in the frontpage table to control sticky et all.
tanks fr dis info
Re: How Does Nairalnad Fronpage Works by Lastdon02(m): 2:54pm On Dec 25, 2014
download pbnl script intall and go tru the script it will help u no how its been done
Re: How Does Nairalnad Fronpage Works by adewasco2k(m): 5:44pm On Dec 25, 2014
There will be so many ways to achieve this without having a separate table that will have all the post id of all topics that have at one time made front page.
Re: How Does Nairalnad Fronpage Works by cbrass(m): 6:11pm On Dec 25, 2014
You don't have to create any table now.just create a status column in the table holding your topics then create a button in front of each topic from the admin end that will be clicked and the status of that topic will be updated by anything you give it so you had in your query a WHERE CLAUSE to select according to the status of each row. Eg if you want those topics that have a status=1 to always be on the front-page, you just include it in your SQL. Select * from topicstable where status=1. That's alll
Re: How Does Nairalnad Fronpage Works by MrAnonymous: 6:35pm On Dec 25, 2014
cbrass:
You don't have to create any table now.just create a status column in the table holding your topics then create a button in front of each topic from the admin end that will be clicked and the status of that topic will be updated by anything you give it so you had in your query a WHERE CLAUSE to select according to the status of each row. Eg if you want those topics that have a status=1 to always be on the front-page, you just include it in your SQL. Select * from topicstable where status=1. That's alll
So how do you then sort the topics to show them according to when you added them?
Re: How Does Nairalnad Fronpage Works by bakenda(m): 9:35am On Dec 26, 2014
MrAnonymous:
So how do you then sort the topics to show them according to when you added them?

You can create a timestamp column for that, if you don't have already.

So the query becomes something like:

Select * from topicstable where status=1 order by frontpage_timestamp

You run that query on the homepage.

1 Like

Re: How Does Nairalnad Fronpage Works by onyengbu: 10:49am On Dec 26, 2014
adewasco2k:
There will be so many ways to achieve this without having a separate table that will have all the post id of all topics that have at one time made front page.

Absolutely. All it takes is adding extra columns on your topics table.

(1) (Reply)

KONGA And JUMIA Secrets Out / What Do You Guys Think Of The New Look Of My Site? / Help! Input Html And Php In Flash Template

(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: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

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