Xavierator
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: WordPress size imagesOk, thanks for your information, I will contact with my client in order to resolve the server security, access, …
Thanks, Xavi
Forum: Developing with WordPress
In reply to: WordPress size imagesDear bcworkz,
The images has been uploaded by profile WP plugin or ftp with dreamweaver.
To get the images information I only have their url.
Thanks, Xavi
- This reply was modified 7 years, 8 months ago by Xavierator.
Forum: Developing with WordPress
In reply to: WordPress size imagesMore information, I can get image info of another WordPress web site like this:
$imgINFO = getimagesize(‘https://www.archertargets.com/images/logos/Facebook_icon_2.png’);
But I can’t get image information of any image of https://www.smartcommunity.es, another sample:
$imgINFO = getimagesize(‘https://smartcommunity.es/wp-content/uploads/2017/01/Logo-Smart-Community-Tra.png’);
It isn’t an uploads folder problem because I can’t get image information of a image out of uploads folder:
$imgINFO = getimagesize(‘https://smartcommunity.es/wp-content/themes/trades/img/Card-Blank.jpg’);
Thanks, Xavi
- This reply was modified 7 years, 8 months ago by Xavierator.
- This reply was modified 7 years, 8 months ago by Xavierator.
- This reply was modified 7 years, 8 months ago by Xavierator.
- This reply was modified 7 years, 8 months ago by Xavierator.
Forum: Developing with WordPress
In reply to: MySQL web page accessDear,
It really works, finnaly I decide to use the 2nd .php file with url in it’s parameters.
Thanks a lot for your help and kind regards, Xavi
Forum: Developing with WordPress
In reply to: MySQL web page accessAt this moment I’m working with your first solution, pass url parameters to 2nd .php file, I think it works right
I will notice you when I finish
Thanks, Xavi
- This reply was modified 7 years, 8 months ago by Xavierator.
Forum: Developing with WordPress
In reply to: MySQL web page accessDear bcworkz,
If I use your second solution and call the 2nd WP page name from <a href=… or if I use my proposed solution I get the same error in TCPDF library:
Fatal error: Cannot declare class TCPDF, because the name is already in use in /homepages/25/d369985012/htdocs/html/tutusaus.cat/wp-content/themes/twentyseventeen/tcpdf/tcpdf.php on line 157
I don’t know how to continue by this way ??
Maybe the only solution (if it works) could be your first proposed solution, pass the information read with $wpdb->get_results() using an url parameters.
Thanks, Xavi
Forum: Developing with WordPress
In reply to: MySQL web page accessDear,
Thanks for your answer bcworkz.
I only need the $wpdb resources and I like your second solution, call a WP second page instead of call directly de .php file
I’ve been thinking in an another solution, all code in the same first php file, the pdf button will re-call to it self usong a parameter, something like this:
if $_GET[‘DetectCall’]=’first_time’
DoTheSameThanNow();
else if $_GET[‘DetectCall’]=’pdf’]
GeneratePDF()What do you think ?, do you know if it can work ?
Thanks, Xavi
Forum: Developing with WordPress
In reply to: MySQL web page accessDear again,
I think that I know where is the problem, but I can’t resolve it.
My custom PHP WP page https://www.tutusaus.cat/card-page/ has a button with a <a href label to another php file that uses tcpdf library, but this 2nd page don’t recognize something like:
$wpdb->get_results
How can I work with $wpdb object in the PDF generator page ?, maybe only with some include ?
Many thanks, Xavi
Forum: Developing with WordPress
In reply to: WordPress page PHP content to PDFDear,
I tried to use tcpdf library but generate wrong PDF files, I don’t know why.
I tried to use plugins like “PDF & Print by BestWebSoft” or “PDF Creator Lite” but don’t work.
Someone knows another solutions ?
Thanks a lot, Xavi
Forum: Developing with WordPress
In reply to: MySQL web page accessDear,
I just finish the page with PHP code inside.
I need to show a “PDF generate” option inside this page. I installed this plugin but it works fine with all pages except my custom page:
https://bestwebsoft.com/products/wordpress/plugins/pdf-print/
Someone knows why or if there are another plugoin for custom PHP pages ?
Thanks, Xavi
Forum: Developing with WordPress
In reply to: MySQL web page accessDear sirs,
I just resolved the MySQL access from my page using something like:
global $wpdb;
$result = $wpdb->get_results( ‘SELECT * FROM wp_usermeta where user_id=’ . get_current_user_id() );
foreach( $result as $row )
{
echo ‘<b>’ . $row->meta_key . ‘</b> = ‘.$row->meta_value . ‘<br/>’;
}Thanks for your help, Xavi
Forum: Developing with WordPress
In reply to: MySQL web page accessDear,
Using get_header() and get_footer() the page works fine:
https://www.tutusaus.cat/card-page/
I will try to use $wpdb object and WP_Query class to access to MySQL tables
If someone have littles samples of MySQL access, please, let me see.
Thanks, Xavi
Forum: Developing with WordPress
In reply to: MySQL web page accessDear,
OK, I put this lines on my new page and WP recognize it as you told me:
<?php
/**
* Template Name: MyCustomBlankPage
*/?>The problem is that the new page (https://www.tutusaus.cat/card-page/) don’t have the default template like other pages (https://www.tutusaus.cat/sample-page/)
I need to create a new page in WP with de default template and include inside a PHP code to access to MySQL tables.
Is it possible to do this ?
Thanks a lot, Xavi
Forum: Developing with WordPress
In reply to: MySQL web page accessDear Maria,
thanks for your fast answer.
Some doubts about #1:
If I understood the better way to create a new custom blank page is copy & rename the page.php in the active theme, maybe something like this ?
wp-content/themes/twentyseventeen/page.php -> wp-content/themes/twentyseventeen/MyCustomBlankPage.php
After that, fine, I can execute the url of the new page:
https://www.tutusaus.cat/wp-content/themes/twentyseventeen/MyCustomBlankPage.php
Which page content do I need to show as other templates pages ?
I don’t understand how can I include the new page in WordPress admin pages, on right hand of new pagse in WordPress admin, I only have Parent and Order but not Template options to choose the new one.
Sorry and thanks again, Xavi