Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
-JS-
Jun 1, 2004

Alfalfa posted:

What do I need to do to get it moved to the right so the logo and it are even with each other?

Float the menu right and remove the 361px right margin on the logo.

Adbot
ADBOT LOVES YOU

Alfalfa
Apr 24, 2003

Superman Don't Need No Seat Belt

-JS- posted:

Float the menu right and remove the 361px right margin on the logo.

I don't know what that means :\

poxin
Nov 16, 2003

Why yes... I am full of stars!

Alfalfa posted:

I don't know what that means :\

Do you have a Custom CSS option in the theme? Enter the following:

#top #logo {
margin-right: 0px;
}

You can play around with 0px to line it up better if you like.

Alfalfa
Apr 24, 2003

Superman Don't Need No Seat Belt

poxin posted:

Do you have a Custom CSS option in the theme? Enter the following:

#top #logo {
margin-right: 0px;
}

You can play around with 0px to line it up better if you like.

Awesome thanks.

Wheeze
Jul 31, 2007

So, I've got a client that's looking to set up a section of the site with a bunch of paid instructional videos. Access is sold by the video, though there are also ways to buy packages of multiple videos and to subscribe to videos. We are using Woocommerce. Best I can figure is to use Groups for Woocommerce and create a new group for each video (as well as general groups for subscriptions and so forth), but this seems cumbersome and has the potential to get quite bloated very quickly. Is there a better way that I'm overlooking?

pipebomb
May 12, 2001

Dear God, what is it like in your funny little brains?
It must be so boring.
Anyone know of a way to generate/import an rss feed of LinkedIn headline keywords? Their API is poo poo.

ConanThe3rd
Mar 27, 2009
So, I'm currently building a blog to improve my wordpress skills and I'm looking to use the sidebar for metadata for posts (Like Tags, Item Data; Ratings, Movie Length) and I'm wondering what the best COA is for that as far as, for lack of a better idea; Creating Databases for the Metadata, inputing said Metadata and then displaying it on the sidebar when you get to that page.

ConanThe3rd fucked around with this message at 14:20 on Feb 23, 2014

spiritual bypass
Feb 19, 2008

Grimey Drawer
Advanced Custom Fields is really the way to go

lunar detritus
May 6, 2009


rt4 posted:

Advanced Custom Fields is really the way to go

This. Creating custom fields by hand is tedious.

Bradzor
Mar 18, 2007
Fwhaa?

gmq posted:

This. Creating custom fields by hand is tedious.

And https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress is almost the exact same thing is ACF, but with code instead of a GUI.

slothrop
Dec 7, 2006

Santa Alpha, Fox One... Gifts Incoming ~~~>===|>

Soiled Meat
I'm having a bit of drama setting up a development server for wordpress sites. i want to be able to direct clients to an ip address and check on the work I've done on their site. After jumping through a few hoops with regards to port forwarding etc I finally am able to access my wordpress installs via xxx.xxx.xx.xx/wordpress (or whatever) but everything still uses absolute URL's so no media appears and the css files are not loaded.

I feel like I'm missing something really basic here? Any ideas?

wwb
Aug 17, 2004

For 95% of things migrating the site urls will work -- the sql one-liner is:

code:
	mysql --host=$db_host -f --user=$rootdbuser -p$rootdbpass --port=3306 --default-character-set=utf8 --comments --database=$dbname -e "UPDATE wp_options SET option_value = '$siteurl' WHERE option_name = 'siteurl';"
	mysql --host=$db_host -f --user=$rootdbuser -p$rootdbpass --port=3306 --default-character-set=utf8 --comments --database=$dbname -e "UPDATE wp_options SET option_value = '$siteurl' WHERE option_name = 'home'"
This doesn't fix poorly developed themes that put urls in custom fields and such.

slothrop
Dec 7, 2006

Santa Alpha, Fox One... Gifts Incoming ~~~>===|>

Soiled Meat

wwb posted:

For 95% of things migrating the site urls will work -- the sql one-liner is:

code:
	mysql --host=$db_host -f --user=$rootdbuser -p$rootdbpass --port=3306 --default-character-set=utf8 --comments --database=$dbname -e "UPDATE wp_options SET option_value = '$siteurl' WHERE option_name = 'siteurl';"
	mysql --host=$db_host -f --user=$rootdbuser -p$rootdbpass --port=3306 --default-character-set=utf8 --comments --database=$dbname -e "UPDATE wp_options SET option_value = '$siteurl' WHERE option_name = 'home'"
This doesn't fix poorly developed themes that put urls in custom fields and such.

Thanks for the quick reply.

I'm terrible with sql syntax but managed to edit the siteurl and home fields in wp_options manually and it seems to have worked.

Thanks again!

tater_salad
Sep 15, 2007


I've got a situation that I normally don't work with and am a bit lacking for a solution to do it.

I have an existing joomla site, but want to replace it with wp and multisite with 3 sub folder installs

Mainsite.com -will probably tie into one of the other 2 depending on how I can work it.
Mainsite.com/a
Mainsite.com/b
Mainsitecom/c

Then use multisite/networking to allow easy content updates.

How do I install it and get it ready without disturbing the joomla install?

I.can do the setup and testing on my host bit don't think I can migrate from host to host especially with different domains ( I have a domain I use for testing theories and installs)

The other option is, a plugin or way to have child sites with their own menu for a/b/c.
Example
They go to mainsite.com
Then click one of the 3 options (a,b,c)
Then are shown content and menus for the pertinent site.

ConanThe3rd
Mar 27, 2009
Ok, using ACF I have a bunch of data I want to display in the side bar and to make sure I only display the aproperate data I have the following code but it's not working for whatever reason, what am I doing wrong?

I'm using the catagory slug ([letter]-review) and 'XRD_name' is the field name.

code:
<div id="sidebar">
	<p>Sidebar</p>
	<?php if has_category( v-review ){ ?>
		<div id="SidebarData_Video">
			<p>This Data appears in the Side Bar in Video Reviews</p>
			<p><?php the_field('VRD_name'); ?></p>
		</div>
	<?php } 
		else if has_category( g-review ){ ?>
		<div id="SidebarData_Game">
			<p>This Data appears in the Side Bar in Game Reviews</p>
			<p><?php the_field('GRD_name'); ?></p>
		</div>
	<?php } 
		else if has_category( b-review ){ ?>
		<div id="SidebarData_Book">
			<p>This Data appears in the Side Bar in Book Reviews</p>
			<p><?php the_field('BRD_name'); ?></p>
		</div>
	<?php }	
		else ?> {
			<p>This Data appears in the Side Bar on the Frount Page</p>		
	<?php } ?>
</div>

Alfalfa
Apr 24, 2003

Superman Don't Need No Seat Belt
http://forums.somethingawful.com/showthread.php?threadid=3613839&

In case anyone is looking to make a few $$$ and help me out.

Flaggy
Jul 6, 2007

Grandpa Cthulu needs his napping chair



Grimey Drawer
Was wondering if anyone knew of a plugin that would pop up a box on a certain webpage to have a customer fill out some information before accessing the page?

Redrum and Coke
Feb 25, 2006

wAstIng 10 bUcks ON an aVaTar iS StUpid
I'm having some problems with a theme, and was wondering if anyone could help me see if I can replicate it on a different server (I'm on a shared hosting account and I've had a couple of issues in the past). I'd just need a wordpress instalation/account for like 10 minutes.

Thanks!

tater_salad
Sep 15, 2007


Non Serviam posted:

I'm having some problems with a theme, and was wondering if anyone could help me see if I can replicate it on a different server (I'm on a shared hosting account and I've had a couple of issues in the past). I'd just need a wordpress instalation/account for like 10 minutes.

Thanks!

email me scrod21 at the geemails..

I've alredy got it set up but dont want to leave anything open by posting the L/P here.

Redrum and Coke
Feb 25, 2006

wAstIng 10 bUcks ON an aVaTar iS StUpid

tater_salad posted:

email me scrod21 at the geemails..

I've alredy got it set up but dont want to leave anything open by posting the L/P here.

Thank you very much!

Sent! :)

EDIT: Despite our best efforts, I'm afraid Tater Salad is on the same server I am (shared lithium hosting) so if somebody from a different server could lend a hand, that'd be awesome.

Thanks tater salad! :)

Redrum and Coke fucked around with this message at 19:55 on Mar 15, 2014

poxin
Nov 16, 2003

Why yes... I am full of stars!

Non Serviam posted:

I'm having some problems with a theme, and was wondering if anyone could help me see if I can replicate it on a different server (I'm on a shared hosting account and I've had a couple of issues in the past). I'd just need a wordpress instalation/account for like 10 minutes.

Thanks!

PM'd you.

Redrum and Coke
Feb 25, 2006

wAstIng 10 bUcks ON an aVaTar iS StUpid
Reposting from the PHP thread, in case that's not the right place (yeah, THAT ignorant)..

--
First of all, I apologize for the ignorance that, I'm sure, I will display in this question.

A. I recently purchased this theme: http://themes.industrialthemes.com/?theme=explicit

B. Upon installing, the theme should work like this, with the demo settings: http://goon.thezane.com/ (images are not part of the demo settings, so that's OK). This is hosted on the server of a fellow goon.

C. The problem is that my theme is being displayed like this: http://www.metalblast.net/explicit/ (copy of main site) ; http://www.metalblast.net/explicit/ (clean install) . The same problem appeared when installing the theme on another server, hosted by the same provider.

I contacted my server provider (Lithium) and was told that the theme uses allow_url_fopen , which is disabled by default, and apparently cannot be overran for security reasons (the sample mentioned in B. above was installed on another goon's server, which does have allow_url_fopen activated). I'm not sure if this is the cause, but I'm desperately trying to get this to work.

Upon further questioning, Lithium said that the following was the problem:

quote:

Here is the issue:

[16-Mar-2014 00:46:56 UTC] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: [url]https://[/url] wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/rgbwrkjl/public_html/explicit/wp-content/themes/explicit/functions/core.php on line 769
[16-Mar-2014 00:46:56 UTC] PHP Warning: file_get_contents(https://plus.google.com/+/posts) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: no suitable wrapper could be found in /home/rgbwrkjl/public_html/explicit/wp-content/themes/explicit/functions/core.php on line 769
[16-Mar-2014 00:46:56 UTC] PHP Warning: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: [url]http://[/url] wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/rgbwrkjl/public_html/explicit/wp-content/themes/explicit/functions/core.php on line 789
[16-Mar-2014 00:46:56 UTC] PHP Warning: file_get_contents(http://gdata.youtube.com/feeds/api/users/screenjunkies) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: no suitable wrapper could be found in /home/rgbwrkjl/public_html/explicit/wp-content/themes/explicit/functions/core.php on line 789

file_get_contents is trying to get from a URL, that requires allow_url_fopen which is disabled. Once this lines of code are fixed to use curl instead, it should work just fine.

The problem for me is that my knowledge of code is close to zero, so I have no idea as to how to solve this problem. If anybody could walk me through this, I would greatly appreciate it (even by sending a present!) since I'm at the end of my rope here and started to believe that I just wasted the money on that theme. :(

Thanks a lot!
--

Weird Uncle Dave
Sep 2, 2003

I could do this all day.

Buglord
Conceptually, it's an easy enough fix: Everywhere that they call file_get_contents() with a Web site, replace it with a few calls to the cURL functions, and put the downloaded content into a variable, which is basically what file_get_contents() does.

Chances are the above made no sense to you, if you're not a programmer. Also, it's likely that every time the vendor updates their theme, you'll have to re-do whatever fixes you make.

If the theme author has any kind of support, you might want to see if they can do this; it should be pretty easy for them to do, and it'll work not only for you but for every other customer of theirs.

Redrum and Coke
Feb 25, 2006

wAstIng 10 bUcks ON an aVaTar iS StUpid

Weird Uncle Dave posted:

Conceptually, it's an easy enough fix: Everywhere that they call file_get_contents() with a Web site, replace it with a few calls to the cURL functions, and put the downloaded content into a variable, which is basically what file_get_contents() does.

Chances are the above made no sense to you, if you're not a programmer. Also, it's likely that every time the vendor updates their theme, you'll have to re-do whatever fixes you make.

If the theme author has any kind of support, you might want to see if they can do this; it should be pretty easy for them to do, and it'll work not only for you but for every other customer of theirs.

Exactly. I'm really sorry to abuse your kindness, but could you explain this a bit more?

Weird Uncle Dave
Sep 2, 2003

I could do this all day.

Buglord
The function file_get_contents() does just what its name implies: You feed it a file, it puts the contents into a local variable. In this case, "file" can also mean "remote Web site," but your Web host turned that feature off for whatever reason. Letting developers put Web pages into file_get_contents() is a convenience.

I'd argue that disabling that feature was silly on the part of your Web host. It just means that you have to put something like this (untested, don't actually use this code) in your theme's functions.php file:

code:
function webpage_get_contents($url) {
  $curlsession = curl_init();
  curl_setopt($curlsession, CURLOPT_URL, $url);
  curl_setopt($curlsession, CURLOPT_FAILONERROR, true);
  curl_setopt($curlsession, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($curlsession, CURLOPT_HEADER, false);
  return curl_exec($curlsession);
}
and replace those specific places (only) where the theme calls file_get_contents('http://whatever') with webpage_get_contents('http://whatever').

Note that this is a very bad idea. When the folks that make the theme release a new version, their changes will overwrite yours, and you'll have to dig through the whole theme again to fix it, and any new places they might use the feature.

Your choices are, in random order:
  • Get your Web host to change that option. Looks unlikely to work, but solves the problem not only for you but for everyone else using that hosting company
  • Get the theme developers to change their theme. Seems a bit unlikely because they'd be doing a lot of extra work to accommodate one customer
  • Move to another Web host, if you can find another one that meets all your other needs and is reasonably cheap
  • Prepare to either edit the theme every time the vendor updates it, or decide that you'll never update the theme

Wheeze
Jul 31, 2007

You could also make a child theme, couldn't you? It looks like the errors are all in a single file, so you could just clone that and make the changes you need to make. You can read about creating child themes on the Codex. That way, you can still update the parent theme without wiping your changes.

Redrum and Coke
Feb 25, 2006

wAstIng 10 bUcks ON an aVaTar iS StUpid
A goon on the PHP thread told me to disable the Social Count widget, and that worked like a charm.

I don't know if there are still issues on the theme, but so far I haven't been able to see any problems additional to that.

As a question, is the allow_url_fopen a very dangerous exploit?

I can't thank you enough for all of your help!

tater_salad
Sep 15, 2007


If im not mistaken these allow for external content to be called and loaded and run on your server. This allows for 2 things.

1. malicious coders could set it so when they click a hidden link it starts your server sending tons of viagara spam. And if you don't scour the code (which most folks wouldn't) you won't catch this until your bandwidth jumps up or your host shuts you down for spamming. Even if you do scour the code it may look like a simple call to an element for the theme such as getting a file from https://www.ponythemes.com/mlp_pictures.php but what you don't know is that mlp_picutres.php isn't a brony picture dictionary.. it's malicious code.

2. I'm not sure but I'm pretty sure it makes PHP injection attacks a ton easier. Which again gives access to your server to do what was highlighted above.

Probably the most common use for this is to use your server for taking over your host for spam sending. But it also allows for folks to take down your site if they so choose since they can run php code from anywhere then. The spam example may not seem so bad, but it is bad because your host then loses credibility with agencies that look at the servers/hosts that provide spam, and will also slow down the other users on your host.. and for you will probably get you temporarily or permanently suspended from your host.


A bit more information from php security consortium.
http://phpsec.org/projects/phpsecinfo/tests/allow_url_fopen.html

The reason that many hosts will keep this feature turned off is that the owners can't scour each piece of code and determine if it's been properly protected, and not pointing to malicious sources. You paid for a theme form a possibly reputable place and it appears that the code is pointing to social media api's or tools (That's what I've gathered from the above stuff)
If it were turned on, there's nothing stopping GoonyGoon 321 from getting the worlds best free theme from haxorthemes.net and loading a theme that has calls to malicious software, becuase the developer wants to spread his seed around the world to gain access for sending dick enlargement and viagara spam.

tater_salad fucked around with this message at 13:10 on Mar 17, 2014

snakeater
May 17, 2008

A paranoiac in reverse.
EasyEngine looks pretty neat.

quote:

easyengine (ee) is a linux shell-script to manage your WordPress-Nginx websites on an Ubuntu/Debian server.

Could be a good, straightforward way of rolling new sites on a Linode/DO Droplet.

Staging is coming in 1.6 too, which would be useful. There isn't a WP staging plugin/service (not part of managed hosting) which doesn't suck yet.

pipebomb
May 12, 2001

Dear God, what is it like in your funny little brains?
It must be so boring.
So...a server I now manage has about 180 installs on it. For whatever reason, each and every one requires FTP credentials for updates and plugin downloads, even recent installs.

It's a fairly standard lamp server, I suppose. Anyway, it occurs to me that even if I manually install wp on my own shared, hosted server, I don't need to use FTP.

So I could manually do the ( define('FS_METHOD','direct'); ) mod as seen on http://www.hongkiat.com/blog/update-wordpress-without-ftp/, but I'm wondering if there's something I'm missing, like a server side config option that other hosts use?

Any thoughts, experience with this?

That said, any ideas on touching every wp-config to append define('FS_METHOD','direct'); barring a system wide change?

Weird Uncle Dave
Sep 2, 2003

I could do this all day.

Buglord
No chance of getting the server admins to fix their stuff so that the built-in WordPress updater will work?

This usually means that the hosting company has a weird permissions setup, so that the Web server doesn't have rights to change stuff in the Web space. This used to be fairly common, but it's getting less so.

pipebomb
May 12, 2001

Dear God, what is it like in your funny little brains?
It must be so boring.
I was looking into it more, and it appears to be related to suexec and possibly apache. I'll ping them tomorrow and see if they can offer advice. Thanks.

Twiin
Nov 11, 2003

King of Suck!
This seems like it should be straightforward, but I'm stuck on it!

If a user searches for 'alice', I would like to show them all posts with the custom taxonomy terms of 'bob' and 'carol', regardless of if those posts contain the string 'alice' in them or not.

I'm able to set the query's tax_query so that it only shows posts with 'bob' and 'carol' as terms, but I can't reset the actual search query so that it is showing all posts, not just posts with 'alice' in them.

This is the filter I'm using to change the tax_query:
code:
if ( !$query->is_search )
    return $query;

$taxquery = array(
    'relation' => 'OR',
    array(
        'taxonomy' => 'people',
        'field' => 'slug',
        'terms' => array( 'bob' ),
    ),
    array(
        'taxonomy' => 'people',
        'field' => 'slug',
        'terms' => array( 'carol' ),
    )
);

$query->set( 'tax_query', $taxquery );
return $query;
but using this to set the search query doesn't work:
code:
$queryvars = array(
        's' => ''
);
$query->set( 'query_vars', $queryvars );

stoops
Jun 11, 2001
If anyone could help, I'd appreciate. I've gotten hacked 3 times the last 7 months.

The first two times, it was a javasript url on the header.php thru a css type edit. (Google caught that one)
This last time, the index.php, home.php, and the footer.php got hacked, as well as the users on the db being changed.

Nothing on the database was deleted, and they didn't really do much damage except to post a notice that I was hacked.


Is there any good link you can recommend where i can go thru and secure my wordpress site? I've talked to the hosting provider and they tell me it's not them.

Any help is appreciated.

Heskie
Aug 10, 2002

stoops posted:

Hacking issues

Check out the Hardening WordPress article on the codex, thats probably a good start.

How old is the site? Do you use an old version of timthumb for resizing images? It was commonly used on WordPress sites some time ago and I still see sites affected by it today. If so make sure its been updated.

With your theme files being edited I'm wondering if its a file permission issue? Make sure they're locked down, usually 644 for files and 755 for directories (see here). If you use an FTP client something like FileZilla can do this recursively.

Other than that take a look at the plugins you have installed, are they out of date, no longer supported, have bad ratings? Not all plugins are created equal and some can be real security risks if the authors were careless.

Personally I'd do a full clean install (backup!!), or if you have a clean local copy of the site, run a diff against it to make sure there's nothing malicious thats been missed previously.

Heskie fucked around with this message at 11:18 on Mar 24, 2014

Gyshall
Feb 24, 2009

Had a couple of drinks.
Saw a couple of things.

stoops posted:

If anyone could help, I'd appreciate. I've gotten hacked 3 times the last 7 months.

The first two times, it was a javasript url on the header.php thru a css type edit. (Google caught that one)
This last time, the index.php, home.php, and the footer.php got hacked, as well as the users on the db being changed.

Nothing on the database was deleted, and they didn't really do much damage except to post a notice that I was hacked.


Is there any good link you can recommend where i can go thru and secure my wordpress site? I've talked to the hosting provider and they tell me it's not them.

Any help is appreciated.

Make sure your poo poo is updated. Make sure your theme is updated, and not an old-rear end theme with lovely/no support (ie. hasn't been updated in a few years.)

Also try installing a security plugin like Wordfence that can do a scan on your install and see what might be the problem.

Lincoln
May 12, 2007

Ladies.
My WooCommerce product pages display three thumbnails below the main "featured" product image. It will rotate through many more images than that, assuming you upload them. I'd like each page to display SIX rotating thumbnails at one time, but I don't know how. My experience level is "novice."

Is this an easy, universal fix, or does it all depend on the theme I'm using?

Gyshall
Feb 24, 2009

Had a couple of drinks.
Saw a couple of things.
That is most likely going to be the theme itself. I haven't touched Woocommerce in a very long time, though.

Chris!
Dec 2, 2004

E
Hey, I'm pretty new to working with Wordpress, and I'm wondering if anyone can help me out.

I'm developing a site for a company who want people to be able to calculate a price then pay them using Paypal. They sell banners, and want to be able to quickly and easily calculate the price - for example having a "width in metres" field, the user inputs "3" for example, a height field, the user puts in "1", then the price is calculated - 3m x 1m x £25 per metre = "Your banner will cost £75". The user can then click "Pay now" and pay that price instantly via Paypal.

There is a plugin called JazzyForms which seems suitable for price calculation, but there doesn't seem to be any way to integrate this with Paypal. I've searched for suitable plugins, but to no avail. Is there anything quick and simple out there for this?

Adbot
ADBOT LOVES YOU

Gyshall
Feb 24, 2009

Had a couple of drinks.
Saw a couple of things.
Look at Gravity Forms (very good) or Woocommerce, although Woocommerce is probably overkill.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply