• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

Web Design and Development |OT| Pixel perfect is dead, long live responsive design

do_shortcode should work. What file are you adding it to and where are you inserting it?

I tried page.php, then header and footer, to see if it worked at all.
I'm trying to put it at the end of the content of the page. In page.php, that would be just before the closing </div> tag, right?
 
I tried page.php, then header and footer, to see if it worked at all.
I'm trying to put it at the end of the content of the page. In page.php, that would be just before the closing </div> tag, right?

Can you add anything to the template? Like, if you add Foobar to your template is it showing up?

You should be able to use ...

Code:
<?php echo do_shortcode(' [B]--your shortcode here--[/B] '); ?>

I'm only including the <?php ?> to ensure that you're using echo do_shortcode() in a php block, and not just rendering it as if it were plain text.
 
Are you sure you are editing the files for your currently active theme?

Actually, that's an excellent question and something I'll have to look into. That might very well be the problem.
edit: nope, I have selected the right child theme in the wp dashboard.
This is really similar with the problem I had enqueuing scripts a few months ago, except now I can't seem to be able to fix the problem even by using plugins.
 
Sounds like you're not picking the right theme files if none of your edits are showing up.

If you're using a child theme the pattern should be like this...

/wp-content/themes/theme-name <--- Parent Theme
/wp-content/themes/theme-name-child <--- Child theme

If you make a change to the parent theme file, copy that into your theme-name-child directory, and then make your changes to it. Whatever's in the child theme directory will take precedence over the parent-theme.

A builder/layout plugin could over-write that, but you should still be able to at least edit some theme files and see the changes.
 

mnannola

Member
Anyone here use elm for anything serious? Compiles to JavaScript, functional language, strong type support. Seems really interesting.
 

smuf

Member
What do you guys use for manual crossbrowser testing?
I used to just run a lot of virtual machines which gave great performance at the cost of using up a lot of precious disk space on my laptop.
For the past couple of years I've been using BrowserStack, but I'm not very pleased with the service. Everything else I've tried seems to be lacking in one way or another too, mostly in performance (i.e. being so unresponsive that it's a pain to just scroll down a page).
 

grmlin

Member
Anyone here use elm for anything serious? Compiles to JavaScript, functional language, strong type support. Seems really interesting.

This is so niche, I would use this only for fun and/or personal sideprojects. In a big project something like this would be a no go. Good luck finding someone working on it with or after you.

What do you guys use for manual crossbrowser testing?
I used to just run a lot of virtual machines which gave great performance at the cost of using up a lot of precious disk space on my laptop.
For the past couple of years I've been using BrowserStack, but I'm not very pleased with the service. Everything else I've tried seems to be lacking in one way or another too, mostly in performance (i.e. being so unresponsive that it's a pain to just scroll down a page).

We share a browser stack license, too, and I don't think there is anything like it on the market. There is no way I will ever install 5 VMs again to test different browsers in different OSs.

Anyway, I don't have to use it that often. I can test iOS on my Mac much more comfortably and using chrome in the mobile emulation mode is pretty much what you get on Android. Browserstack is for IE and Windows in general.
 
Sounds like you're not picking the right theme files if none of your edits are showing up.

If you're using a child theme the pattern should be like this...

/wp-content/themes/theme-name <--- Parent Theme
/wp-content/themes/theme-name-child <--- Child theme

If you make a change to the parent theme file, copy that into your theme-name-child directory, and then make your changes to it. Whatever's in the child theme directory will take precedence over the parent-theme.

A builder/layout plugin could over-write that, but you should still be able to at least edit some theme files and see the changes.


I figured it out: it's a caching problem. This morning I went to check on the site, and I noticed that the ''foo''s I put in the template were there. This is a problem because I removed them before going to bed. I reset the cache and, sure enough they disappeared from the webpage.
 
I figured it out: it's a caching problem. This morning I went to check on the site, and I noticed that the ''foo''s I put in the template were there. This is a problem because I removed them before going to bed. I reset the cache and, sure enough they disappeared from the webpage.

Amazing. I'm always stunned by server side caching ... like ... I don't even get how that works, haha.

Are you using W3 Total Cache or any of those other Caching plugins for WP?
I swear to god it seems like the majority of those plugins cause more errors than the problems they solve...

What do you guys use for manual crossbrowser testing?
I used to just run a lot of virtual machines which gave great performance at the cost of using up a lot of precious disk space on my laptop.
For the past couple of years I've been using BrowserStack, but I'm not very pleased with the service. Everything else I've tried seems to be lacking in one way or another too, mostly in performance (i.e. being so unresponsive that it's a pain to just scroll down a page).

I use BrowserStack too. I think it's the best multi-browser, OS testing service out there. Haven't used anything else that's close.
 

Lister

Banned
Amazing. I'm always stunned by server side caching ... like ... I don't even get how that works, haha.

Are you using W3 Total Cache or any of those other Caching plugins for WP?
I swear to god it seems like the majority of those plugins cause more errors than the problems they solve...



I use BrowserStack too. I think it's the best multi-browser, OS testing service out there. Haven't used anything else that's close.

I heart Browserstack as well. I'm not aware of anything that even remotely matches their service.

It would be cool if I could integrate them with our automated testing, anyone have done something like that?
 
Amazing. I'm always stunned by server side caching ... like ... I don't even get how that works, haha.

Are you using W3 Total Cache or any of those other Caching plugins for WP?
I swear to god it seems like the majority of those plugins cause more errors than the problems they solve...

Yeah...I definitely agree that overusing plugins can be dangerous in Wordpress. I just learned it the hard way. :D
Still, with this, my work on the site in officially done; I'm not super proud of how it turned out, and I had to swallow some aesthetic choices from my client that I don't approve of (guess which ones I'm talking about...), but people seem to like it. I guess I am my harshest critic in this case: www.centrofinanzagevolata.it/
Note how there is still a lorem ipusum in one of the pages...guess who neglected to give me the text for that particular page? ;)
I'm glad I can finally move on to new projects.
 

Daffy Duck

Member
So, the site I spoke about a little while ago (WordPress) is going to be re-written outside of WordPress, however there is a lot (I'm talking 2,000+ registered users, 500+ of those are schools who post jobs etc) now my question is, is there any simple way to export all this data (primarily thinking passwords and user account details) here out of the WordPress system and into our own system?

I'm thinking it is going to be a nightmare.
 

this_guy

Member
So, the site I spoke about a little while ago (WordPress) is going to be re-written outside of WordPress, however there is a lot (I'm talking 2,000+ registered users, 500+ of those are schools who post jobs etc) now my question is, is there any simple way to[/B] export all this data (primarily thinking passwords and user account details) [/B]here out of the WordPress system and into our own system?

I'm thinking it is going to be a nightmare.

You can get all the users and passwords from the database associated with that wordpress site.
 

diaspora

Member
Does anyone have documentation on how to use google maps with react? The front page of google is a complete dumpster-fire of tutorials on making overdesigned webapps.
 

etrain911

Member
Hey all, I am going to be entering an information program to learn HCI/UX design and research and I'm looking to learn some programming languages. My first go-to is Python as I've heard it recommended as the easiest program to learn. I looked at the recommended learning websites and just thought I'd add one. py4e.com is an amazing site (run by one of the professors of the school I got into so I'm super excited!) that has really understandable videos and assignments (especially since I only have a psychology background). I was wondering after Python, what should the next language I learn be? What websites from the recommended list have been most helpful to you all?
 

this_guy

Member
Really? It's that simple? There's no special algorithms for WordPress? And I just simple do password_verify on those stored passes and bingo?

Wordpress stores user names and passwords in a database. Passwords can be encrypted but by default I believe they're stored in plain text.
 

Daffy Duck

Member
Wordpress stores user names and passwords in a database. Passwords can be encrypted but by default I believe they're stored in plain text.

That's not correct (at least in the instances I have seen so far with all the Wordpress sites we have).

All the passwords on this site are hashed.
 

this_guy

Member
That's not correct (at least in the instances I have seen so far with all the Wordpress sites we have).

All the passwords on this site are hashed.

I worked at a web host briefly and saw more passwords stored as plain text than being hashed. People locked themselves out and I would go update their password directly in the database which was in plain text. It was easy enough to hash those passwords but people didn't for whatever reason.

If you're migrating a Wordpress site for a decent sized business then hopefully they had an IT person that at least hashed the passwords.
 
What are your opinions on Dreamweaver?

Horrible garbage. Even Adobe thinks so. About 2 or 3ish years ago they release Brackets, a free, paired down code editor. It's a solid code editor but no better than Atom, SublimeText, or Visual Studio Code.

Any perks of Dreamweaver, like the oft-touted ability to quickly convert a PSD mock into CSS or a working web page, is a straight up marketing lie by Adobe.

Wordpress stores user names and passwords in a database. Passwords can be encrypted but by default I believe they're stored in plain text.

This is not true. WordPress has never stored plain text passwords by default... at least for as long as I've worked on WP, going back 10+ years. With the earliest versions it used a salted MD5 password, but it moved away from that since... I dunno at least 2010. Today WP uses a function called wp_hash_password() that uses OpenWall PHPass, in conjuction with the one-time salts that you define in your wp-config.php file.

I don't even know what settings you'd have to turn off to store passwords in plain text.

Make no mistake, WP is generally considered less secure than other CMS's, but that's usually not because of it's password hashing, it's because of insecure plugins and their popularity.

I wonder if the Webhost you worked for had a WP installer (Fantastico, etc) that automatically disabled hashing for users who installed it using the installer... Because by default that should never be the case, and over-writing it means over-writing wp_hash_password with a custom function that intentionally ignores all hashing.

So, the site I spoke about a little while ago (WordPress) is going to be re-written outside of WordPress, however there is a lot (I'm talking 2,000+ registered users, 500+ of those are schools who post jobs etc) now my question is, is there any simple way to export all this data (primarily thinking passwords and user account details) here out of the WordPress system and into our own system?

I'm thinking it is going to be a nightmare.

It's going to be difficult and I'd encourage you to not export passwords and have users setup a new password when they move to the other site. If you have to export passwords, WP takes a users PW and runs it through a function called wp_hash_password(), and then it salts the password multiple times using a salt table defined in your wp-config.php file. There are other hashes that get piped onto it (when someone registered and other items), which you might be able to reconstruct, but it'd be difficult. And then when you move to the new system you'd have to convert that hash into something that your new site can use, or be stuck using WordPress' wp_check_password(); function.

I'd suggest as part of the migration explaining to your users that you're moving to a new system, and that at a given time they'll be pinged on their primary email address to update their passwords for the site. When you make the migration, send a note to every user to update their passwords using a new forgot password system.
 

kevm3

Member
I have to give React a try soon, but I'm finding Angular 2 a MUCH more natural approach to the front end than ng1 and right up my alley what with my .net C# background. It's nice to have a complete toolset out of the box, vs cobbling one up together piecemeal.

Now rxjs and redux with angular 2 has definitely been a challenge. But I'm coping.

I find angular 2 leagues better than 1. ngrx/redux does indeed have quite a learning curve.
 

Daffy Duck

Member
It's going to be difficult and I'd encourage you to not export passwords and have users setup a new password when they move to the other site. If you have to export passwords, WP takes a users PW and runs it through a function called wp_hash_password(), and then it salts the password multiple times using a salt table defined in your wp-config.php file. There are other hashes that get piped onto it (when someone registered and other items), which you might be able to reconstruct, but it'd be difficult. And then when you move to the new system you'd have to convert that hash into something that your new site can use, or be stuck using WordPress' wp_check_password(); function.

I'd suggest as part of the migration explaining to your users that you're moving to a new system, and that at a given time they'll be pinged on their primary email address to update their passwords for the site. When you make the migration, send a note to every user to update their passwords using a new forgot password system.

Yeah, I thought it was going to be a ball ache.

My thoughts are inline with yours but I wanted to ask as I know my boss will try and worm out some way of least resistance for this migration. He's just that way.
 
I was wondering what peoples thoughts and experiences are with collaborating with others online with projects? Basically, I have an idea for a website which I am slowly trying to build with Rails, but realistically my bulk of my experience is in the front end, so even if I managed to build a prototype, I would want to make sure the backend is built properly and securely.

For the website to be a success, it would need to draw a reasonable online community. So I wouldn't want to screw up something on it which could open it up to being hacked.
 

jokkir

Member
What the best configuration for working with Wordpress locally and using build tools like Gulp & Browsersync? I need to set up a project at work and want to use familiar tools for Wordpress site building.

So far I've seen using things like XAMPP but doesn't seem to be the same as running tools on non-Wordpress sites. I guess I have to use a virtual machine (or container) with this so the database can be properly loaded?
 
What the best configuration for working with Wordpress locally and using build tools like Gulp & Browsersync? I need to set up a project at work and want to use familiar tools for Wordpress site building.

So far I've seen using things like XAMPP but doesn't seem to be the same as running tools on non-Wordpress sites. I guess I have to use a virtual machine (or container) with this so the database can be properly loaded?

Trellis is pretty nice: https://roots.io/trellis/
 
I am hoping someone can shed some light on this problem I am having, since I am rather new to web dev. I recently got involved with a project at work, which is a Django/AngularJs application, connecting to a Postgre DB.

Everything has been fine, but recently I had to connect this app to our legacy MSSQL 2005 server. I've done some minor modification and everything is nice and working on my local server, running on a Win10 machine.

However, the problem arised when I tried to deploy this to a ubuntu 14.04 machine.

Originally, I used pyodbc + FreeTDS, I made sure everything is working locally on that ubuntu machine. However, the server won't respond, throwing ERR_EMPTY_RESPOND when I tried to access it via its IP address.

After fiddling with it for a while, I switched from pyodbc to pymssql, still problem. But this time, it's a little bit different, the browser keeps on loading, but won't return anything. Then once and only once, Django threw an error, a SQLAlchemy ORM error to be exact when it's trying to reflect a database table to create a Python class. This means it's working somehow. I made some changes to my models, redeployed, and the never-ending browser loading continues.

I checked out the database server ports, I can see that there are some connections between the linux server and the database server, some are in ESTABLISHED state and some in FIN_WAIT_2 state.

Any ideas?
 

grmlin

Member
Just wanted to say: Fuck Drupal.


What a mess if you like your own style to write HTML. And what a mess in general, when you never used it before.

I'll definitely try to never be part of a Drupal project again.
 

gutshot

Member
Ha! Pretty sure that is everyone's first reaction to Drupal. But you get used to doing everything via the GUI. And as a CMS, it is very flexible, secure and stable.
 
This might be a bit more enterprise than web deployment, but someone in here has to have some ideas.

After watching some Youtube videos and setting up a few Jmeter tests, I've somehow become the load test expert at work. (Don't be like me, keep that shit to yourself)
I had a test that ran against our test environment every night just using a Windows scheduled task with the intention of expanding on it later, until someone else offered to help get it onto a reporting dashboard. 3 months and 20 request center requests later, this is the current process.
1. Windows task scheduler fires off a batch script that executes the test, waits for it to finish, the copies the resulting log file to a network drive. (This is all I have direct control over).
2. 3 - 4 separate Control-M jobs move it from the network drive to wherever the hell Informatica can find it.
3. There's a 5-6 step Informatica job that takes the .csv Jmeter spits out and and loads it to a database.
4. This database is then grabbed by Tableau and a few charts are created. (At least this is the dream, the Control-M requests were just completed yesterday, this has been in progress since October).

Problems:
This seems way to complicated (nevermind expensive), for what should be a relatively simple task. The Jmeter job outputs a 450kb csv with around 4000 rows, each about 15 columns.
I just want to see what the min/max and average response times from the test and make sure things aren't going up after a deployment.

Anyone here who is familiar with load testing have any suggestions or advice? I feel like this is a problem a single developer should be able to handle and not require 5 different teams across the enterprise.
 

smuf

Member
Just wanted to say: Fuck Drupal.


What a mess if you like your own style to write HTML. And what a mess in general, when you never used it before.

I'll definitely try to never be part of a Drupal project again.

I'm going to assume it's a Drupal 7 project? Drupal 8 uses Twig for theming and allows for easy overriding of everything with custom html.
 

smuf

Member
No, it's 8 and it's a pain.

Really, I find 8 to be super easy and quick to work with. Maybe it's just because I use it on 90% of my projects and I don't know any better.

I started using Drupal back when 7 released (2011) since it was the CMS of choice at the agency I had just joined and that was a real pain to learn.

Do you have the twig debug settings turned on? Those inject comments into the DOM that point to the template files used for each element + naming suggestions to override them.
 
Top Bottom