Jump to content
Sign in to follow this  
bizint

PHP editing - it either breaks the site or doesnt do anything??!

Recommended Posts

bizint

Hi All, maybe I'm confused about how PHP works with Child theme. I've tired two things both have failed massively. Most recent one - is following these simple instructions to make nextgen images click to a page link see here: http://www.kimwoodbridge.com/how-to-link-nextgen-gallery-images-to-an-individual-page-or-post-in-wordpress/#comment-27221 It seems to work for everyone except me. I follow instructions, make changes, but the images still just click to image not the url I've created. I edited the php by going to plugin giving permission to edit using file=zilla, then going back to wordpress and using the editor - I cut and paste the exact code...and nothing happens... this suggests I'm nit changing thr right file...should I change another and put it somewhere else? Am I editing the wrong area? is the child theme messing it up? I'm going mental here. Also I asked other questions in another thread here: http://www.pagelines.com/forum/discussion/15088/carousel-any-way-to-make-it-constant-loop#Item_14 Talking about editing php and pasting into the base folder...wtf? I can edit a php file...but where does it go? "the base folder" is not helpful. I'm at the end of my tether of sanity...spent months building my site...the smallest things take freaking weeks... I mean we're talking linking some images...and making a carousel loop...hardly wysiwig...waaahhh

Share this post


Link to post
Share on other sites
Jenny
What theme are you using? If you're using the 2.0 framework, you should activate the PageLines Customize plugin and then you edit functions.php in Plugins -> Editor -> PageLines Customize -> Functions.php. If you're using PlatformPro, activate PlatformBase (and keep it as your active theme) and then click Appearance -> Editor -> Functions.php.

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites
bizint
?????????????? Yes Platform Base....its active, using it to control Platform pro I guess. Ok so I go to Appearance -> Editor -> Functions.php.then what?! Its the the the gallery.php I need to edit in nextgen gallery - I can see it in filezilla ftp in wp-content/plugins/nextgen-gallery/view/gallery.php - well I've edited this file and nothing happens (via ftp)....god knows how I edit it through wordpress.... Appearance -> Editor -> Functions.php. this means absolutely nothing at all...what is functions.php? how does that change the php I need to change...how could I even find that and edit it through the wordpress back end.... Then there is the other query from the other thread but one at a time...its very very not clear...

Share this post


Link to post
Share on other sites
bizint
Ok...I think I've figured out what to do...although it still doesnt work...for anyone new to this: Download a text editor (I use textwrangler for mac) download an ftp program to look deep into the site back end files (I use filezilla)... Then delve deep into the site using filezilla - find the php you're looking for...that'll take a while...then save that file to your desktop, open it with text wrangler (or notepad for windows I guess) and edit it as instructed. Then save back to desktop...and upload the edited php file (make an original copy in case you edited it wrong because one simple mistake will screw everything up and you might have to put the original file back!) and save it in a completely new location - that will be platformbase> sections and voila... it probably wont work, but that what you do! There must be a better way using the editor in wordpress...

Share this post


Link to post
Share on other sites
bizint
http://www.kimwoodbridge.com/how-to-link-nextgen-gallery-images-to-an-individual-page-or-post-in-wordpress/#comment-27221 This is sooo simple above...what am I doing wrong? This is my php (I saved the edited file called gallery.php to the sections area in platform base) this is the php - exacly as instructed...I've put in the custom field and everything... The page I'm trying to manipulate is http://www.businessinteriors.co.uk/portfolio/clients/ and according to everyhting I've done - if you click on the brittany ferries logo or the balfour beatty logo...it should take you to the case studies...not the image....here is the php in the gallery.php...as per instructions above If you would like to show the timestamp of the image ,you can use **/ ?>
kastelic
If you are going to edit the nextgen gallery gallery.php file you have to upload it back into the exact same location( in plugins/ngg-gallery/ etc... ). Did you say you uploaded it to a different location? To check to see if you are uploading the saved file into the correct location just add some code as a littel test. For example, change [code]

Share this post


Link to post
Share on other sites
bizint
Why is everyone telling me to put new php in base then in sections ?! N E WAY... ....so I go via ftp to to www.businessinteriors.co.uk/wp/plugins/nextgen-gallery/view/gallery.php wp>plugins>nextgen-gallery>view>gallery.php and once their change the php using my text editor in that file and I dont put it anywhere else, I out it straight back in....I just change the php simply, like says here: http://www.kimwoodbridge.com/how-to-link-nextgen-gallery-images-to-an-individual-page-or-post-in-wordpress/#comment-27221 ..and it should work right?!

Share this post


Link to post
Share on other sites
bizint
I've uploaded it to the same direction and the base location with new php and nothing is happening :-(

Share this post


Link to post
Share on other sites
bizint
I'm not sure how a plugin conflict could be causing this...I changed the pho has directed so that the link URL is a page and not the image....even I can see that this code change should have at least broken the gallery if nothing else...I can't see how it could work otherwise...and yet it still works. How could a plugin conflict make it work the old way? Very strange. The whole php editing thing is way way harder than CSS tweaking....and that's not exactly straight forward....maybe I need to put my question another way. Does anyone know how Imcan get images in my gallery to link to a page? Www.businessinteriors.co.uk/portfolio/clients

Share this post


Link to post
Share on other sites
Rob
Okay.. let's take a deep breath here for a moment and retrench so we get you the help you need. It seems this topic is jumping all over the place. The article you have cited above dates from 2009 and hasn't been updated to factor in any changes in NextGen. It seems this needs to be applied as a solution for NextGen, not PlatformPro. If your basic goal is to make the images linkable, there are much easier solutions. Starting from a simpler angle, let us know your basic and ultimate goals.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
kastelic
You can do it with Jquery but its going to be so slow and so much more work than a simple little PHP edit, it pains me to post it but here you go: [code] [/code] Paste in Custom Code -> Footerscripts. Leave the top and bottom lines (between the script tags) and duplicate the middle lines for every image. Like I said, with all those images its probably going to slow down your page a ton. I don't know what else to tell you about editing the PHP file, if a page is generated from a PHP file and you edit that php file the page is going to change, there's just no way around it. I hope that you have already turned off all your caching plugins, because thats the only thing I could think of that would make it not change.

Share this post


Link to post
Share on other sites
bizint
Hi Kastelic...I wont put in your jquery thing...as slowing down site I dont want to do. The problem seems to be with understanding how to edit PHP using a child theme. I just cant seem to do it following instructions without breaking the site...maybe some future update will make it easier to edit and understand

Share this post


Link to post
Share on other sites
Jenny
Hi @bizint I gave you the information about PlatformPro child themes because you asked. ;) If you are editing PHP files in a plugin, such as NextGEN, then all of those files should stay within that plugin and have absolutely nothing to do with PlatformPro. You should really be contacting NextGEN support for this as that is their plugin, not ours. We can only give you tips to point you in the right direction since it is not a PageLines product. To make it easier to edit plugin files, just go to Plugins -> Editor and select the plugin from the drop down box, then select the file you want to edit. Keep in mind any changes you make to plugin files will be lost when the plugin is updated. Better keep a copy on your computer to be safe. ;)

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×