473,624 Members | 2,502 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to add a counter for new content on a website?

SwissProgrammer
220 New Member
I thought about requesting that bytes.com do this, but this is an information & learning site, so I am asking of all readers how this can be done.

How many Questions have been added (which I have not clicked on thus removing them from the count) since I last "reset" the count?

How many Articles have been added (which I have not clicked on thus removing them from the count) since I last "reset" the count?

Currently:



Updated:



How to do that?

I log into bytes.com .

I see the count of Articles and Questions that I have not viewed.

If the count is larger than zero, then if I want to reset this count to zero, then maybe a little red button that does that.

No red button if there is no count above zero.

If I click on an Article or Question then the count goes down by one to no less than zero.

Whether bytes.com does this or not, how do you readers suggest that a site do this? You pick the language and you give an example of the code that does it. This is a learning site, so no pseudo-code please. Later viewers might use the code to guide them for their own site.

Thanks.
Jun 11 '20 #1
7 5798
dev7060
644 Recognized Expert Contributor
Whether bytes.com does this or not, how do you readers suggest that a site do this?
It can be done if a site has the public API. A custom made app can then make use of it.

For this site, I guess it is possible by using the sitemap with some custom js running on the client-side.
Jun 11 '20 #2
SwissProgrammer
220 New Member
Thank you dev7060.

I was thinking that a site could keep (on one of the the site's servers) records of this choice for each logged on user. The site could then dynamically create the page for each user. This is already being done in a similar manner when users post replies and edit replies. But, I want to see code from other programmers (not limited to use on bytes.com) would do this.

I am not asking, this time, for a client-side bit of code, but examples of server-side code.

Thank you.
Jun 12 '20 #3
Otekpo Emmanuel
23 New Member
What bytes.com did is to count the number of questions asked by users. I don't know the kind of technique bytes.com used, but as for me, using simple sql count can solve this. Hope this helps?
Jun 19 '20 #4
SwissProgrammer
220 New Member
Anyone?

This is an amazing site, with some very experienced programmers. A little bit of code maybe. If later I have a site and I want to do similar, the I would like to be able to go back to this question and at least see a working example that I could learn from and possibly adapt to that need.



Thank you Otekpo Emmanuel. "but as for me, using simple sql count can solve this." Ok. Simple for you. I have sql. I am looking forward to your direct server-side code example. "Simple" for others here on this site sometimes has meant weeks of study for me when I could have learned so much quicker and been guided so much clearer by working examples. I am looking forward to your code.
Jul 8 '20 #5
SwissProgrammer
220 New Member
Anyone?

Thank you Otekpo Emmanuel. But, I am seeing this.that.what. now.more and seeing it as some .net stuff that I am trying to move away from. I used VS and .net for years and I am currently trying to use straight Stroustrup C++ without that stuff.

Please do not take this as a negative against you, but I have been learning to state at the beginning "No VS and No .net". You gave me an answer. Thank you. I must as for a better answer without that stuff.

Thank you.

Generic code that can be used outside of bytes.com. Thanks.

Anyone?
Jul 22 '20 #6
Otekpo Emmanuel
23 New Member
You are welcome SwissProgrammer . I hardly work with c++
Jul 22 '20 #7
SwissProgrammer
220 New Member
I really wanted this as a part of bytes.com.

Then, if bytes.com wants to tell us how it is done, and give us example code that does it, then we get to learn.

But, please bytes.com add this to your site pages.

Please.

Thank you.
Jul 22 '20 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1153
by: simonc | last post by:
I posted some questions about text boxes and received a reply which partially resolved the issues. 1. I want to construct a text box (or rich text box) where if you type a space a dot character appears in the box. (like MS Word when the formatting characters are displayed). Following advice from Larry Serflaten I created a sub to check for Key Down events and inserted the following: If e.KeyCode = 32 Then e.Handled = True
0
963
by: Anthony Nystrom | last post by:
Hello... I am working on an extensive performance counter project (one that uses them that is), Machine name is prop for most of them... When I select (enter string for another machine name) I get no population of category, instance etc... What is the Machine Name prop really for, if it can't access other LAN computers... (I suppose a permission issue exists, could) Does anyone have experience using performance counter but binding to a...
3
5051
by: majorecono | last post by:
What I'm bad at is the dialog box part. This is the code Ive come up with... if you see a way to improve what im thinkng of.... post it please. Program should.... 1. Ask user to type in a sentence, using JOptionPane.showInputDialog(). 2. The program will scan each letter in the string and count how many times the upper case letter 'E' appears, and how many times the lower case letter 'e' appears. 3. Using a JOptionPane.showInputDialog(),...
0
2373
by: George2 | last post by:
Hello everyone, I am not sure whether I am wrong or the Windows Internals Book 4th version is wrong. Here is what the book says in Chapter 7, Memory Management from Page 444 to Page 445 --------------------
1
3600
by: jerger | last post by:
I have not made a program or page from start yet. I have made modifications to our signoff asp pages like changing the questions, texts, shortening field lengths etc... I also have copied the files and reused them for other domains asp 1: Basically I have a signoff asp script... that asks a. name b. email address (then submit).. this data is written to a sub folder's text file with the same name signoff.txt if the signoff.asp is...
2
2416
by: Jamie Taxer | last post by:
I am using Visual Basic for a Psychology experiment and I would like to check and see if the participants answered all of the questions on one form before moving on to the next. So far this is what I have done and it is not working. If txbAge.Text = String.Empty Then MsgBox("Wie Alt bist du?") Else : Me.Hide() AnagramExample.ShowDialog() End If If female.Checked = False And male.Checked =...
0
8179
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8631
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8341
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8490
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7174
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1489
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.