Skip to content
Sign upLog in
← Back to Community
Display view count on a post
Profile icon
ironblockhd

This file cannot be displayed: https://testcounter.ironblockhd.repl.co/c/2897ec429b2d First, you need to generate your image codes on https://testcounter.ironblockhd.repl.co.
You can embed the first image where you want to show the count. The second image is invisible, rendering it will increment the total count.

This post has This file cannot be displayed: https://testcounter.ironblockhd.repl.co/v/2897ec429b2d views (reset due to botters lol)

Voters
Profile icon
mhamrick23
Profile icon
stoporinjail
Profile icon
programmeruser
Profile icon
AgastyaSandhuja
Profile icon
RolandJLevy
Profile icon
ARJPEG
Profile icon
aflacc
Profile icon
Leroy01010
Profile icon
gibbsfreenergy
Profile icon
Aidan0626
Comments
hotnewtop
Profile icon
AmazingMech2418

I totally didn't just bot it. LOL!

while true; do curl "https://testcounter.ironblockhd.repl.co/c/2897ec429b2d" curl "https://testcounter.ironblockhd.repl.co/v/2897ec429b2d" done
Profile icon
ironblockhd

Hehe you only have to bot the /c/ one

Profile icon
AmazingMech2418

@ironblockhd
Yeah. I know, but I still botted it...

Profile icon
AmazingMech2418

@ironblockhd
Congratulations on 5092 views by the way! LOL!

Profile icon
ironblockhd

Nice haha

Profile icon
HahaYes

@AmazingMech2418
SO MECH Where ARE YOU

Profile icon
AmazingMech2418
Profile icon
conspicous

I just used it on my post ;)

Profile icon
HahaYes

This is really cool ironblock!

Profile icon
VivaanSa

This file cannot be displayed: https://testcounter.ironblockhd.repl.co/v/1b3769256312

Profile icon
DynamicSquid

What dude this is insane! How'd you make it?

Profile icon
ironblockhd

@DynamicSquid
Thanks! i used replits new database and made a simple http server that sends server-generated svg images

Profile icon
DynamicSquid

@ironblockhd
oh I see, that's cool! for an update, could you make it so that only one user can view it one time?

Profile icon
ironblockhd

A lot of people have third party cookies deactivated and google chrome plans to disable it by default, so it wouldn't really be worth it

Profile icon
ironblockhd

haha someone botted the views

Profile icon
Leroy01010

I wonder how many people read the comments:

This file cannot be displayed: https://testcounter.ironblockhd.repl.co/v/19f41971db75
This file cannot be displayed: https://testcounter.ironblockhd.repl.co/c/19f41971db75

Profile icon
Leroy01010

how do you use it

Profile icon
ironblockhd

Embed both codes it gives you, for replit posts etc select markdown and for websites select html

Profile icon
Leroy01010

so i need to copy and paste the code

@ironblockhd

Profile icon
ironblockhd

Yep, the code it provies you
IMG_2826

Profile icon
Leroy01010
Profile icon
ironblockhd

@Leroy01010
np, sorry for understanding the question wrong at first

Profile icon
Leroy01010
Profile icon
gibbsfreenergy

So how does this work?

Profile icon
ironblockhd

@JosephSanthosh
i used replitDB to storage the counts and have a simple server set up that sends dynamically generated svg images. When you embed the image that it gives you it will display the count

Profile icon
gibbsfreenergy

@ironblockhd
Oh Ok. So I just embed the image in the code?

Profile icon
gibbsfreenergy

@ironblockhd
Did you write all the code in here? How would I have to add this in my code, do I copy each file seperately?

Profile icon
ironblockhd

Yes, both seperatly

Profile icon
gibbsfreenergy
Profile icon
AncientBison

I wonder can i use markdown...
This file cannot be displayed: https://testcounter.ironblockhd.repl.co/v/684911bb4285

Profile icon
johndo3

for some reason it doesnt work on my post, https://repl.it/talk/share/A-blog/49129

Profile icon
ironblockhd

You need to add a image for both links, you also need to add [loading..](https://testcounter.ironblockhd.repl.co/c/65ca4caa5a46)

Profile icon
johndo3

@ironblockhd
I might need you to help me a bit, the counter works, but can you add repl sign-in to my program?

Profile icon
ironblockhd
Profile icon
Code1Tech
Profile icon
ironblockhd

@Code1Tech
thats the link that adds to the count when you render it, here's the link your searching: https://testcounter.ironblockhd.repl.co/v/bdf19bd38de

Profile icon
Kookiez

cool!

Profile icon
adl212

This is awesome! I can add it to my projects!

Profile icon
VivaanSa

This file cannot be displayed: https://testcounter.ironblockhd.repl.co/c/1b3769256312
This file cannot be displayed: https://testcounter.ironblockhd.repl.co/v/1b3769256312

Profile icon
hg0428

Style the counter, needs more work.

Profile icon
zplusfour

image
I don't think that 195631 people saw this post
but cool anyway

Profile icon
ironblockhd

Someone botted it lol

Profile icon
zplusfour
Profile icon
ironblockhd

Someone spammed views lololol

Profile icon
Wilke000

Oh wow!

Profile icon
DynamicSquid

This file cannot be displayed: https://testcounter.ironblockhd.repl.co/v/4cfd9c912f4d

This file cannot be displayed: https://testcounter.ironblockhd.repl.co/c/4cfd9c912f4d

Profile icon
DynamicSquid

actually wait no that's a stupid question sorry

Profile icon
DynamicSquid

Does this work for comments?

Profile icon
Codemonkey51

Cool

Profile icon
VulcanWM

Epic!

Profile icon
MarcusWeinberger

This is very neat!

Profile icon
Kudos

Does anyone else see this error?
TypeError [ERR_INVALID_URL]: Invalid URL: undefined/views
at onParseError (internal/url.js:257:9)
at new URL (internal/url.js:333:5)
at request (https.js:287:30)
at Object.get (https.js:318:15) at req (/home/runner/databaseTempSync.js:4:10)
at Object. (/home/runner/databaseTempSync.js:14:3) at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14) {
input: 'undefined/views',
code: 'ERR_INVALID_URL'
}

Profile icon
ironblockhd

Noooo not the undefined database bug again :( i already made a post on https://repl.it/bugs/p/database-url-returns-undefined but now i think i know the issue

Profile icon
ironblockhd

Works again now for some reason lol

Profile icon
InvisibleOne

Cool