Forum Replies Created

Viewing 27 posts - 1 through 27 (of 27 total)
  • Author
  • in reply to: Child theme implementation #76344
     adamdale1
    Participant

    Sorry to you, dunnyuk, for not acknowledging your response, so thank you, it re-asserted the information I already had! I’ve found in other areas where I’ve had a problem, after pains taking research that one tiny snippet of information is missing, and now days without the key word or phrase, you get caught in an never ending circle, until by accident you find it and then Abracadabra it all falls into place and you have a solution!

    in reply to: Child theme implementation #76343
     adamdale1
    Participant

    Dear Andrei,
    Thank you, for your response and this is the last attempt at an answer to my question, just wondering if questions on the child theme are read or if because child theme is mentioned it an automated response to point to links and not even read the question ? I’m one of the original programmers, I was writing software before there were machines, but processors, working in machine code! And have been involved in all aspect of programming since then, but for a period of time, during which a number of new languages came into existence, since then I believe I’ve caught up! Please read this all, before responding! My site is still in testing mode, it’s not advertised and not working at this time on the Internet, but is on a Host! The front door to the site has had 12,500 visitors to date, on checking they have been bots and hackers, some have bypassed some security measures in place and accessed the test sites! When identified, measures were put into place to disallow that access point.

    I have spent a year and a half learning creating software in php, for the Sweetdate theme! I’ve created functions that originally had a page of code and reduced them to a few lines, and they work like the original, but the now hundreds of thousand of lines of information I’ve read in documentation, forums etc. on child themes led me to try experimenting, adding files etc. to the child, that have not had any effect at all and any updates can overwrite my work! Before I ask I research all avenues, then ask! I got amused when I saw the same questions in this forum, asked over and over again, I did help out pointing users to the solution, but then found that, even when the solution was noted on the front page for all to read, they still asked it without any search! So stopped

    I understand that functions.php in the theme and child complement each other! It also states that other files like index.php placed in the child theme overwrite the same in the theme itself, giving it preference!

    I’ve checked and analysed the code I’ve put in the child, as far as I can tell it’s correct by the information I have and read at this time, yes, everything I have done is backed up and documented by me! The functions.php is not a problem now, but any changes I’ve made in the theme itself, will be lost if I update, the information I’ve read all makes sense, but there is a snippet I’ve either missed or has not been mentioned! So every attempt at trying to implement code into the child has had a catastrophic, minor failure or has not worked! So I’ll keep it simple the following is my index.php, the standard WordPress version and any changes or additions made to it will revert back to this original on an update!

    <?php
    /**
    * Front to the WordPress application. This file doesn’t do anything, but loads
    * wp-blog-header.php which does and tells WordPress to load the theme.
    *
    * @package WordPress
    */

    /**
    * Tells WordPress to load the WordPress theme and output it.
    *
    * @var bool
    */
    define(‘WP_USE_THEMES’, true);

    /** Loads the WordPress Environment and Template */
    require( dirname( __FILE__ ) . ‘/wp-blog-header.php’ );

    To it I want to add … require(‘./c_main.php’);
    just below <?php … I have now lost count the number of times I’ve added it and sometime later found that’s it’s reverted to the original and the number of times I’ve asked for an example of code to put in the child theme to be told, read this or that or it’s as simple as 1, 2, 3, not giving me any code at all ! I’m almost at the stage of abandoning my project and starting again in a totally different language, the only reason I’ve continued is the sizeable investment in money and time, I’ve already put into this project!

    If you ask why not put the function somewhere else where it won’t be updated, well the main reason index.php is the entry point to the site, anywhere else the user is already on the site and can possibly if smart enough bypass what this function does!

    The following is the modified index.php that works till an up date!

    <?php
    require(‘./c_main.php’);
    /**
    * Front to the WordPress application. This file doesn’t do anything, but loads
    * wp-blog-header.php which does and tells WordPress to load the theme.
    *
    * @package WordPress
    */

    /**
    * Tells WordPress to load the WordPress theme and output it.
    *
    * @var bool
    */
    define(‘WP_USE_THEMES’, true);

    /** Loads the WordPress Environment and Template */
    require( dirname( __FILE__ ) . ‘/wp-blog-header.php’ );

    Just the addition of one line of code above which is in bold to highlight it, all I’ve read, says put the above into the child theme, it doesn’t say where? And doesn’t say much, whether it requires some sort of pointer or whatever to be implemented!
    So is this code correct to be put in the child theme? If not what would the code be? Does it need to go into a specific directory or not? Do I require additional code somewhere else in the child? Or is this beyond the scope of this forum and I have to go to the WordPress experts? I understand a simple example easier than explanations!

    in reply to: Child theme implementation #75905
     adamdale1
    Participant

    I started with Sweetdate over a year and a half ago! Due to a browser update, I can’t run it on my localhost not your problem! So it’s working off a Host, basically on line! I know that changes to the main theme should be done in the child! For some reason, how to do this is eluding me! I’ve read nearly every article on the subject and links to information on the child ,have wasted my time! I need to understand the operation of the child theme, then I can implement my changes without loosing them, so far every effort in reference to the child has caused an error, taking the site down, taking me in circles!

    So I’ll keep the question simple, I need to add a function to index.php of the Sweetdate theme called v_main.php, I added it numerous times, I now loathe any updates whether WordPress or plugins! The theme and function is working, but then it stops, when I check the original file is there again minus my additions! So far everything I’ve tried has taken my site down!

    So taking it that I want to add “require v_main.php” to index.php in the theme, what and how? Do I do to make an index.php file in the child theme to take precedence over the theme’s index.php. No links please, just a simple example and description please! This has frustrated me since I started and now is causing me the most problems, If you can’t help with the response, please don’t reply! I don’t need a maze opened again, leading me back to here after fruitless hours of research!

    in reply to: Help with Theme #75058
     adamdale1
    Participant

    In reference to that question, yes, that’s what an FTP does, transfers files to the internet, I originally started using localhost, but due to it not being a dedicated server and very slow, also, finished turning off all updates on my PC, seems that I was spending more time, finding out why local host went down, usually an update in the the browser changing a setting, in the end I cross loaded to a host with my FTP, also my backup is on localhost, I started with Sweetdate well over a year and a half ago, still developing, my problem I’m a perfectionist and won’t open it up till I’m satisfied it works the way I want! Also purchased specialised software, plugins and features! On going project!
    Using a host mean that if the site is opened and working, after any changes, reset the browser cache and check the site, updates should be instant, but found sometimes a delay, the site may be down! And with a current back up, reload and you’re back before you made any changes!

    in reply to: Help with Theme #75051
     adamdale1
    Participant

    Well, a way to go! A lot to learn!
    Sweetdate runs from within WordPress, WordPress works on a server, either Local Host on your PC or an Internet Host!
    Local Host (off-line) is great as a backup and development, test bed area and it’s free! You can use WAMP or XAMMP (free severs), downloadable from the net for PCs, then once installed, load WordPress, finally you load the Sweetdate and child themes into WordPress using the administration to make changes!

    Hosting(on-line) costs, once you have it, it should have an install WordPress application, then it’s the same as local, you can either use the administration panel to edit files, or use an FTP, to upload files to host from local.

    I can’t stress a working backup, you’ll find that sometimes a minor change upsets Sweetdate, could be a plugin of software you wrote and if it totally goes down due to these changes, you can overwrite those errors with the original, or remove the plugin! The last thing you need is to start from scratch!
    At the moment, your on the ground of a multi-story building, there’s a long way to get to the top!

    in reply to: Child theme implementation #74063
     adamdale1
    Participant

    Thankyou, for the reply and a copy of your child functions.php I’ve examined the code, I see you added code, my simple question is, is the Sweetdate functions.php still the original as downloaded or modified? I’ll re-examine it, tomorrow when I have a clear head!

    in reply to: How to use Sweet Date #74060
     adamdale1
    Participant

    look in the archives for setup, it’s a html file in documentation called index.html it has a video and most of the info you need!

     adamdale1
    Participant

    Browser cache clear
    Don’t know if this is going to help you or not? But I had similar problems, changing items then finding that the changes did not happen. I found that resetting the browser cache and reloading the page show that the changes did occur! Seems that the browser cache loves storing and resubmitting the shortest version of code it has stored so that the page loads quicker ignoring the longer updated version. It especially loves error codes it has stored! I clear my browser cache anytime I make changes, wasted countless hours of coding to find this simple browser quirk caused me to think it was not working when it was!

    in reply to: Sweetdate setup #71379
     adamdale1
    Participant

    http://cupidlove.hk/wp-admin/options-general.php
    TICK BOX ANYONE CAN REGISTER, by the way don’t give out login and password for registration, I change the field, If I was you you change the admin and keep it secret, if I was not a nice person, I could have put in a back door!

    in reply to: Blank pages/ site #70374
     adamdale1
    Participant

    Hope you keep a backup!

    But follow this link it should lead to a solution, the exact location of the fix is in some simple coding, but where now? Found that if it’s major problems like yours etc. or just accessing the site. The link should give you the code to fix it somewhere in this forum, but it been a while since I needed it and don’t remember the syntax I enter to find the solution when I had the same problem!

    https://archived.seventhqueen.com/forums/topic/fatal-error-6

     adamdale1
    Participant

    Hi Laura,
    Was very interested in the above, reference default avatar for Female/Male. So experimented with it! Have a few questions?

    1. Where is the code supposed to be inserted? Function.php or bp_function.php etc. ?
    2. I keep getting a parse error on the 3rd line of code!
    function myavatar_add_default_avatar( $url ) {

    So, any information on the above would be a great help. Thank you.

    in reply to: Admin page not working #66970
     adamdale1
    Participant

    True, but if you check the files they are compatible, I unzipped and replaced them and fixed my problem straight away, only difference is the name sweetdate/inc and the new kleo/inc directories.

    in reply to: Admin page not working #66960
     adamdale1
    Participant

    https://archived.seventhqueen.com/wp-content/uploads/2015/07/kleo-theme-update-fix.zip

    All I can say in the last 24 hours numerous people have had similar problems! And the above link is an update that has solved most of the mentioned problems!

    https://archived.seventhqueen.com/forums/topic/fatal-error-6
    is the link where the problems are mentioned!

    in reply to: Trouble with Login #66958
     adamdale1
    Participant
    in reply to: Trouble with Login #66957
     adamdale1
    Participant

    https://archived.seventhqueen.com/forums/topic/fatal-error-6

    check this link, it sounds like my problem and the info in the link fixed it!

    in reply to: problem with profile #63814
     adamdale1
    Participant

    Just adding to the question, I haven’t got a solution to either problems, but when looking at the code in bp_functions by my reading of the code for the search on the home page, its not looking at “I am a” (sex), but “looking for”, where in my case, I also have Couples, so if a user has selected looking for man, woman and couple or just man or woman, the search result automatically looks at the “looking for” field which contains all three or what ever and returns the result because one of the individual parts match on the SQL data base! And yes the @ before the user name is there too, but has not been a major issue to me, but a solution would save me the trouble of researching the code, later for a solution.

    And in response to a previous question of mine on gender, the key word is sex and function $sex.

    in reply to: gender reference #62841
     adamdale1
    Participant

    After more extensive searching, examined bp-functions, found the following line @ line 147.
    ‘sex’ => __(‘I am a’, ‘kleo_framework’),
    also a function $sex
    at the time was trying to work out how Sweetdate searched for in my case Man, Woman or Couple from the Homepage search form, have found that the results of the search are incorrect, not displaying what is stored in the SQL database. My localhost test bed is currently out of commission due to an upgrade in Mosilla Firefox. But believe the sex is what I was originally looking for! So there are three issues I need to resolve to continue, the Fire fox, so I can test then the Sweetdate ones.

    in reply to: Homepage Image – Total Page #58457
     adamdale1
    Participant

    Hi Pam,

    Don’t’ know if this is your answer?

    But on my site, created a number of membership levels, then edited each page, except the home page by ticking require membership boxes and updating, now the home page display and when a menu item is selected, it ask you to login to see the contents of the page selected.

    in reply to: Contact Site / GPS #55875
     adamdale1
    Participant

    One more thing to try, this one, has caused me problems until I found it, clear the cache in your browser, for some reason mine always goes to errors that I had previously and not the new page I want, once you clear it, it should go to the page you typed in not what it stored in memory, if that doesn’t well I’m lost!

    in reply to: Contact Site / GPS #55807
     adamdale1
    Participant

    Check the Contact page, reference Membership Required, if this is checked only membership levels can access it, unchecked everyone! Hope this works for you.

    in reply to: Adding another Gender #54040
     adamdale1
    Participant

    It’s not really, it’s copy and paste, 6 months ago, I started in it, now I’m looking deeper into it, now trying to work out how to give gender based avatars on registration to new users! Have a look at the code mentioned, you’ll find it will fall into place.

    in reply to: Adding another Gender #54028
     adamdale1
    Participant
    in reply to: Demo Content – Pictures #53500
     adamdale1
    Participant

    Hi, if you read the sweetdate 2.7.html, located in wp-content/ themes, it says, All photos used in preview are not included in the template & several images are from http://www.istockphoto.com, http://www.dreamstime.com. Personally, I haven’t used any images except the icons, just in case of a breech of copyright, last thing I or you need is someone saying, it’s mine or ours! When you have an active site. If their not in the above locations, I’m sorry, I don’t know?

    in reply to: removing elements from site #53497
     adamdale1
    Participant

    Hi, on the home page in the dashboard, pages, edit out the sections you don’t need, I can’t remember whether the commercial is there or not? Being it’s long gone, but search the .php files on tv commercial, then open and delete out what you don’t need on that page! Turn off the sticky menu under Sweetdate, layout settings!

    in reply to: SERIOUS PROBLEM, PLEASE HELP! #53193
     adamdale1
    Participant

    No, you’ve done well, I always backup before adding plugins or make changes in the code, one minor syntax error can take the site down!

    in reply to: Adding a gender (sex eg. Couple) #51033
     adamdale1
    Participant

    In reply to darkarcher & subwolf, be careful how you use “Couple” is the gender and “couple” used in code!

    Added the “Couple” to the ‘’Iam a’ under the wp-admin, Users, Profile Fields!

    Created a new icon ‘status_05.png’ and stored it in /assets/images/icons/steps/status_05.png,

    In line 210
    $sex_type = array(__(‘Man’, ‘kleo_framework’), __(‘Woman’, ‘kleo_framework’));
    changed to
    $sex_type = array(__(‘Man’, ‘kleo_framework’), __(‘Woman’, ‘kleo_framework’), __(‘Couple’, ‘kleo_framework’));

    then again in line 238

    learnt about the if/else/else php command and searched for “Woman”in bp-function
    At line 1340 added

    case ‘couples_online’:
    $image = ($image == ”)? get_template_directory_uri().’/assets/images/icons/steps/status_05.png’ : $image;
    $number = bp_get_online_users(“Couple”);
    break;

    @ 1343 added function

    if (!function_exists(‘kleo_couples_online’)) {
    function kleo_couples_online( $atts, $content = null ) {
    $field = ”;
    extract(shortcode_atts(array(
    ‘field’ => ‘Couple’,
    ), $atts));
    return bp_get_online_users($field);
    }
    add_shortcode(‘kleo_couples_online’, ‘kleo_couples_online’);
    }

    @ 1344 added the following to tie it into sweetdate

    default:
    if ($type == ‘Man’) {
    $image = ($image == ”)? get_template_directory_uri().’/assets/images/icons/steps/status_04.png’ : $image;
    } elseif($type == ‘Woman’) {
    $image = ($image == ”)? get_template_directory_uri().’/assets/images/icons/steps/status_03.png’ : $image;
    } else {
    $image = ($image == ”)? get_template_directory_uri().’/assets/images/icons/steps/status_05.png’ : $image;
    }
    $number = bp_get_online_users($type);
    break;

    the final @ 1344 assumes that if it not a man or woman then it must be a couple
    that’s it!
    By the way am posting a question about user avatars, have worked out a solution to gender specific avatars but don’t understand the coding in sweetdate so can’t implement it till I do!

    in reply to: Adding a gender (sex eg. Couple) #47035
     adamdale1
    Participant

    Thank you, for the replies, look like I just needed that break from looking at the code, when I came back to it, I found the problem, fixed it & tested it, it all works, now I know I can add as many genders(sexes) as I want and have it working!

Viewing 27 posts - 1 through 27 (of 27 total)

Log in with your credentials

Forgot your details?