Ten years ago, Barnsley's night-time economy reached 'rock bottom'.
Its reputation as a friendly, lively party town had all but disappeared as a culture of binge drinking took over the remaining bars and nightclubs.
It was a long way from Barnsley's heyday, when it attracted clubbers from all over Yorkshire and the pubs thronged with miners keen to spend their earnings from shifts at the nearby pits.
Cocktail bars, local coffee beans and roasted duck: How Barnsley is regenerating through street food
Older people and those looking for a relaxed night out began to desert Barnsley and it became a 'young man's town', according to local publican David Clayton, who has been in licensed trade for 30 years.
A decade on and things are looking very different. Independent traders have opened food-led businesses that emulate those on offer in larger cities, and bar owners are working together to make their premises safer and discourage heavy drinking. The nightclubs have all closed.
And Barnsley's after-dark transformation has now been recognised as the town has been awarded coveted Purple Flag status, becoming only the fourth destination in Yorkshire - after Leeds, Sheffield and Halifax - to receive the accolade.
The Purple Flag scheme rewards towns and cities that offer a safe and diverse night-time economy where the focus has moved away from high-volume alcohol sales.
In Barnsley's case, the council has invested heavily in regeneration projects, including the flagship Market Kitchen street food hall, which is attracting a demographic that previously avoided the town centre at night.
Bar owner David Clayton has seen it all in 40 years of socialising in Barnsley, and he is keen to stress that landlords are also working together to make the town safer and more welcoming.
His business, Soho Music Institute, was re-branded last year. Back in the 1980s, the building was a popular nightclub.
There's now a food menu, refurbished decor and a roof terrace with stunning views over the Dearne Valley that he believes could be the biggest in Yorkshire.
Adelphi wins biggest ever contract on Glassworks regeneration scheme in Barnsley
"Barnsley has had a bit of a bad reputation, a false reputation as a place where people worry about safety and security. Serious incidents are few and far between, but there has long been a culture, dating back to my dad's day, of having one drink in a pub and then off you go to the next one.
"Back in the 1980s, Barnsley was amazing. People used to come in on coaches from Leeds and Sheffield for a night out. There were a lot of old men's pubs then, but then in the 1990s the fun pub idea came in - jukeboxes and neon lights. The 1990s were the halcyon days. Wellington Street would be a sea of people. It was one pub, one drink - it was a cultural thing, in other towns people would stay in one place for longer.
"People would go out from 7-11pm and spend four hours loading before going to a club.
"Times change. People could get away with drinking a lot in those days and then going into work the next day. Thursday was a big night because the miners were paid by the pits. Sunday was too. All the nightclubs have gone now."
David works with nearby businesses Evoo, Annie Murray's, Hill 16 and Soul Lounge to monitor the behaviour of customers and eject troublemakers.
"My bar is near the town hall and it's a nice area now - we manage the beer pricing, and five of us work together on security. If someone is banned from one bar, they are banned from them all. We don't allow big groups of men.
"We've totally refurbished Soho, we've stolen ideas from the Belgrave Music Hall and Headrow House in Leeds - but our roof terrace is bigger than theirs. We've re-branded and got a new name. I kind of took over the pub by accident, and back then only about 30 per cent of our floor area was in use. There was an old pool that had been a water feature in the nightclub and it had rats living in it!
"We try to keep up with big cities and the next trends. New York and Melbourne were our inspiration for the refurb - we've really gone to town.
"Barnsley hit rock bottom about 10 years ago. Since then, the council have invested in the top end of town and everyone seems to gravitate here now. We want people to have two drinks here, to dwell longer and to ensure that we have given them a nice environment.
"People seem to prefer leisurely afternoon sessions, they'll have some food and take their time - we have a good food menu now too.
"The council have helped - with the Market Kitchen development, they are bringing the sort of demographic we want into the town. They are older, less interested in getting drunk. Ten years ago it was a town for young men. Now, our customers are mainly in their mid-30s and there is a better gender mix. In the past, they wouldn't have touched Barnsley with a bargepole.
"I think we're a long way from getting people in from Leeds and Sheffield again but strides are being made.
"We took down a duplex flat above the bar to build the roof terrace and I think it's one of the best in Yorkshire - you can see across the Dearne Valley for miles, it's a view to die for."
Barnsley Council said they were 'delighted' to have been given a Purple Flag.
Spokesman for public health Coun Jim Andrews said:
“We are absolutely delighted to have been awarded Purple Flag accreditation. Barnsley joins only three other towns in the Yorkshire region to gain Purple Flag status so this is a huge achievement.
“We have worked hard over the past three years to improve Barnsley’s evening and night-time economy and address a number of issues to make our town centre a more vibrant and welcoming place that offers a safe and enjoyable night out.
“We have launched a number of schemes here in Barnsley to improve the town centre and support our Purple Flag submission; the Best Bar None scheme which offers a partnership approach to resolving alcohol issues in the town centre; Ask for Angela, a scheme which protects anyone who is on a night out, where someone is making them feel uneasy; and Reducing the Strength; a campaign that has resulted in a significant shift in the approach of retailers, some have already voluntarily stopped selling single cans of high-strength alcohol, while others have it included as part of their licence.
“Growing the Best Bar None scheme is one of our priorities - we have been shortlisted for this year’s most innovative scheme for introducing our own category for ‘Best Dining Experience’.
“The Association of Town and City Management commended the fact that Barnsley is the first area in the country to have a public health lead for Purple Flag. Whilst we recognise that this is an important achievement we know there is always more to do and our hard work and commitment will continue.”