Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,152,911 members, 7,817,684 topics. Date: Saturday, 04 May 2024 at 05:13 PM

SEUN: Please Add Highlight Plugin For Webmaster/programmer Section - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / SEUN: Please Add Highlight Plugin For Webmaster/programmer Section (1384 Views)

Panama Paper: Wordpress Plugin, Possible Cause Of Hack - Wordfence / Administrator (seun) Please Add A Ranking Feature / Online Store Plugin For Wordpress (2) (3) (4)

(1) (Reply) (Go Down)

SEUN: Please Add Highlight Plugin For Webmaster/programmer Section by Nobody: 1:27pm On Oct 16, 2012
I think with all the Free plugins around, i shouldn't have to bother giving spacing to codes just to make them feel appropriate, a highlight plugin will be cool especially for the Web/Dev Forums, because Syntax Highlighting is appealing for people to read codes here, please Bro add Syntax Highlighting thanx. wink
Re: SEUN: Please Add Highlight Plugin For Webmaster/programmer Section by Seun(m): 4:43pm On Oct 16, 2012
Try the code tag:
def hello():
print("hello world" )

if __name__ == "__main__":
hello()
Re: SEUN: Please Add Highlight Plugin For Webmaster/programmer Section by DualCore1: 5:46pm On Oct 16, 2012
^^^
You see the smiley that brings out its head in your code?


Check stackoverflow's formatting for an idea of what the [code] tag should be like. Line numbers useful too.
Re: SEUN: Please Add Highlight Plugin For Webmaster/programmer Section by sisqology(m): 5:08am On Oct 26, 2012
Edited cheesy cheesy cheesy
Re: SEUN: Please Add Highlight Plugin For Webmaster/programmer Section by Nobody: 11:18am On Oct 26, 2012
am SERIOUSLY DISAPPOINTED that i thot i would elicit at least a response about if it can be possible or not.
Re: SEUN: Please Add Highlight Plugin For Webmaster/programmer Section by Seun(m): 12:32pm On Oct 26, 2012
You got a response.
Re: SEUN: Please Add Highlight Plugin For Webmaster/programmer Section by Seun(m): 2:46pm On Oct 26, 2012
If you think this is important, why not send me an implementation I can plug in?
Re: SEUN: Please Add Highlight Plugin For Webmaster/programmer Section by Seun(m): 2:57pm On Oct 26, 2012
I have posted code many times, and the [code] tag has been good enough every time. Sure there's a minor rendering bug, and I have checked the code trying to figure out what's responsible for the rendering bug, with no luck. The programmers I hired could not figure it out either. 99.99% of Nairalanders are not affected at all, and those 3 Nairalanders affected can avoid it very easily.
Re: SEUN: Please Add Highlight Plugin For Webmaster/programmer Section by pastormustwak: 2:03am On Oct 27, 2012
Na wa for you sef. So the great webmasters complaining are mumu abi? Oya delete my post again.
Re: SEUN: Please Add Highlight Plugin For Webmaster/programmer Section by talk2me006(m): 6:09am On Oct 27, 2012
Seun: I have posted code many times, and the [code] tag has been good enough every time. Sure there's a minor rendering bug, and I have checked the code trying to figure out what's responsible for the rendering bug, with no luck. The programmers I hired could not figure it out either. 99.99% of Nairalanders are not affected at all, and those 3 Nairalanders affected can avoid it very easily.
Seun! i believe those 3 affected are so important. remember a small water drop make the ocean.
Re: SEUN: Please Add Highlight Plugin For Webmaster/programmer Section by sisqology(m): 7:18am On Oct 27, 2012
Its not locked now
Re: SEUN: Please Add Highlight Plugin For Webmaster/programmer Section by Nobody: 8:28am On Oct 27, 2012
Seun thanks for answering i found a Syntax mod for smf, the link is here, i hope it doesn't bring any vulnerability, http://custom.simplemachines.org/mods/index.php?mod=2925

1 Like

Re: SEUN: Please Add Highlight Plugin For Webmaster/programmer Section by Seun(m): 9:01pm On Oct 27, 2012
pc guru: Seun thanks for answering i found a Syntax mod for smf, the link is here, i hope it doesn't bring any vulnerability, http://custom.simplemachines.org/mods/index.php?mod=2925
Thanks. Unfortunately, we don't use SMF.
Re: SEUN: Please Add Highlight Plugin For Webmaster/programmer Section by ogzille(m): 11:04pm On Oct 27, 2012
@seun, can you get me on to it? Let me see if i can figure the issue out?

1 Like

Re: SEUN: Please Add Highlight Plugin For Webmaster/programmer Section by Xandelle: 2:31pm On May 17, 2020
Almost 8 years since topic was created. Why not just use css, javascript and html to hardcode it.


Create a css style for the code tag. For example, it should have dark background, and use the Css overflow property. As it is now any code that is longer than the device width gets cropped off.. With the overflow property, it adds a handle to enable the user scroll to the end. If used well you can also include a maxheight so codes can't be taller than a specified height... Any code taller than that, will have to be scrolled up.

code {
color: #eeeeee;
background-color: #aaaaaa;
overflow-x: auto;
overflow-y: auto;
}


Create a css style for the syntax.
.syntax {
color: #00bbff;
font-weight: bold;
}


Create a list of syntax. It's gonna be looooooong (in order to satisfy most languages), but copying and pasting will make things easier.

Make the list into a javascript array, can even be a json object.
var syntax = ['var', 'for', 'foreach']


Now whenever the code tag is used, javascript checks for each word, and if any word is in array list, the word changes to the color, and any other properties you have defined for syntax in your css.

for word in syntax...
Sorry js isn't my strong suit, but php

for each new line, incrementbthebkine number and display the next line number.
I can only do this in php shaa.

All this can also be done completely in php.
Re: SEUN: Please Add Highlight Plugin For Webmaster/programmer Section by Nobody: 2:06am On May 18, 2020
Seunn boy is a mumu fooll non progressive lucky shy stingy clown who got lucky with Nairaland.

Zero Innovation in his coconut head


All what seun cares about is ads money and how to ban people.

Or promote tribal wars, Religious bashing and keeping the irrelevant content ever flowing

2 Likes

Re: SEUN: Please Add Highlight Plugin For Webmaster/programmer Section by nurain150(m): 8:52pm On Dec 10, 2020
Seunn boy is a mumu fooll non progressive lucky shy stingy clown who got lucky with Nairaland.

Zero Innovation in his coconut head


All what seun cares about is ads money and how to ban people.

Or promote tribal wars, Religious bashing and keeping the irrelevant content ever flowing
no mind am .seun u need to improve this forum

(1) (Reply)

Vamido Vs Tolet Vs Privateproperty: Best UI/UX Goes To? / Facebook Traffic And Google Adsense / The Incredible Mtn, Etisalat, Glo & Airtel Cheats Update.

(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. 20
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.