Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I've been trying to get the fullpage code to work for days and no dice. #4540

Open
FarmerJerry opened this issue Apr 27, 2023 · 5 comments
Open

Comments

@FarmerJerry
Copy link

I don't know how to get the extension code to accept my license. I reached out to 'support' and got schooled on licensing, copied and pasted the 'correct' code, and still, license is invalid. Ugh. I wish I knew about the plugin before purchase. Ugh, I wish the instruction links in the emails worked. Ugh, I wish there was support. I don't want to share my license numbers on here, so how do I get support, help or anything like that?

@FarmerJerry
Copy link
Author

'; echo '

CSS Scroll Master Settings

'; // Display the logo in the top right corner echo '

F6M Logo

'; // Start the form echo ''; // Nonce field for security wp_nonce_field('css_scroll_master_save_settings', 'css_scroll_master_nonce'); // Activation options echo '

Activation Options

'; echo '

Activate site-wide

'; echo '

Activate on specific pages/posts

'; // Dropdown for pages echo '

Select Pages

'; echo ''; foreach ($pages as $page) { $selected = in_array($page->ID, $selected_pages) ? ' selected' : ''; echo '' . $page->post_title . ''; } echo ''; // Dropdown for posts echo '

Select Posts

'; echo ''; foreach ($posts as $post) { $selected = in_array($post->ID, $selected_posts) ? ' selected' : ''; echo '' . $post->post_title . ''; } echo ''; // Submit button echo '
'; // End the form echo ''; echo ''; } // Function to handle form submissions and save settings function css_scroll_master_save_settings() { // Check if the form is submitted if (isset($_POST['submit'])) { // Verify nonce for security if (isset($_POST['css_scroll_master_nonce']) && wp_verify_nonce($_POST['css_scroll_master_nonce'], 'css_scroll_master_save_settings')) { // Save activation option $activation_option = isset($_POST['activation_option']) ? sanitize_text_field($_POST['activation_option']) : 'site_wide'; update_option('css_scroll_master_activation_option', $activation_option); // Save selected pages $selected_pages = isset($_POST['selected_pages']) ? array_map('absint', $_POST['selected_pages']) : array(); update_option('css_scroll_master_selected_pages', $selected_pages); // Save selected posts $selected_posts = isset($_POST['selected_posts']) ? array_map('absint', $_POST['selected_posts']) : array(); update_option('css_scroll_master_selected_posts', $selected_posts); // Add a success message add_settings_error('css_scroll_master_messages', 'settings_saved', 'Settings saved successfully.', 'updated'); } else { // Add an error message add_settings_error('css_scroll_master_messages', 'nonce_failed', 'Failed to save settings. Please try again.', 'error'); } } } add_action('admin_init', 'css_scroll_master_save_settings'); add_action('admin_head', 'css_scroll_master_add_css'); // Function to add custom CSS for the settings page and front-end navigation function css_scroll_master_add_css() { // Add CSS for the settings page echo '<style> .css-scroll-master-logo { float: right; max-width: 150px; /* Adjust as needed */ margin-top: -10px; /* Adjust as needed */ } </style>'; // Add CSS for the front-end navigation if (!is_admin()) { echo '<style> .fp-controlArrow:before { color: #000 !important; /* Set the color of the navigation arrows to black */ } @Keyframes fadeIn { 0% { opacity: 0; } 100% { opacity: 1; } } .fp-section { animation-name: fadeIn; animation-duration: 1.5s; animation-fill-mode: forwards; } </style>'; } } // Function to conditionally enqueue FullPage.js assets on the front end function css_scroll_master_enqueue_assets() { // Get saved settings $activation_option = get_option('css_scroll_master_activation_option', 'site_wide'); $selected_pages = get_option('css_scroll_master_selected_pages', array()); $selected_posts = get_option('css_scroll_master_selected_posts', array()); // Determine whether to load FullPage.js assets on the current page $load_assets = false; if ($activation_option === 'site_wide') { $load_assets = true; } elseif ($activation_option === 'specific') { if (is_page($selected_pages) || is_single($selected_posts)) { $load_assets = true; } } // Enqueue FullPage.js assets if necessary if ($load_assets) { // Enqueue FullPage.js extensions wp_enqueue_script('fullpage-fadingEffect-js', plugins_url('fullpage.fadingEffect.min.js', __FILE__), array('fullpage-js'), false, true); // wp_enqueue_script('fullpage-waterEffect-js', plugins_url('fullpage.waterEffect.min.js', __FILE__), array('fullpage-js'), false, true); // wp_enqueue_script('fullpage-drag-and-move-js', plugins_url('fullpage.dragAndMove.min.js', __FILE__), array('fullpage-js'), false, true); // wp_enqueue_script('fullpage-cards-js', plugins_url('fullpage.cards.min.js', __FILE__), array('fullpage-js'), false, true); wp_enqueue_script('fullpage-parallax-js', plugins_url('fullpage.parallax.min.js', __FILE__), array(), false, true); // wp_enqueue_script('fullpage-dropEffect-js', plugins_url('fullpage.dropEffect.min.js', __FILE__), array(), false, true); // wp_enqueue_script('fullpage-continuousHorizontal-js', plugins_url('fullpage.continuousHorizontal.min.js', __FILE__), array(), false, true); // wp_enqueue_script('fullpage-interlockedSlides-js', plugins_url('fullpage.interlockedSlides.min.js', __FILE__), array(), false, true); // wp_enqueue_script('fullpage-offsetSection-js', plugins_url('fullpage.offsetSection.min.js', __FILE__), array(), false, true); // wp_enqueue_script('fullpage-responsiveSliders-js', plugins_url('fullpage.responsiveSliders.min.js', __FILE__), array(), false, true); // wp_enqueue_script('fullpage-resetSliders-js', plugins_url('fullpage.resetSliders.min.js', __FILE__), array(), false, true); // wp_enqueue_script('fullpage-scrollHorizontally-js', plugins_url('fullpage.scrollHorizontally.min.js', __FILE__), array(), false, true); // wp_enqueue_script('fullpage-scroll-overflow-reset-js', plugins_url('fullpage.ScrollOverflowReset.min.js', __FILE__), array(), false, true); //wp_enqueue_script('fullpage-js', 'https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/4.0.19/fullpage.min.js', array('jquery'), '4.0.19', true); // Enqueue FullPage.js CSS wp_enqueue_style('fullpage-css', 'https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/4.0.19/fullpage.min.css'); // Enqueue FullPage.js library (Use fullpage.extensions.min.js instead of fullpage.min.js) wp_enqueue_script('fullpage-extensions-js', plugins_url('fullpage.extensions.min.js', __FILE__), array('fullpage-js'), false, true); // Enqueue FullPage.js library (Use fullpage.extensions.min.js instead of fullpage.min.js) //wp_enqueue_script('fullpage-js', plugins_url('fullpage.extensions.min.js', __FILE__), array(), false, true); // Enqueue FullPage.js library (Use fullpage.extensions.min.js instead of fullpage.min.js) //wp_enqueue_script('fullpage-js', 'https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/4.0.19/fullpage.extensions.min.js', array(), false, true); // Enqueue the "parallax" extension file before fullpage.extensions.min.js //wp_enqueue_script('fullpage-parallax-js', plugins_url('fullpage.parallax.min.js', __FILE__), array(), false, true); // Enqueue custom initialization script wp_add_inline_script('fullpage-js', ' new fullpage("#fullpage", { licenseKey: "xxxxxxxxxxxxx", fadingEffect: true, fadingEffectKey: "xxxxxxxxxxxxx", parallax: true, parallaxKey: "xxxxxxxxxxxxx", }); '); } } add_action('wp_enqueue_scripts', 'css_scroll_master_enqueue_assets'); // function to make shortcode compatibility function css_scroll_master_fullpage_shortcode($atts, $content = null) { // Generate a unique ID for this instance static $instance_count = 0; $instance_count++; $instance_id = 'fullpage-' . $instance_count; // Define default attributes $atts = shortcode_atts(array( // ... (other attributes) ... 'fading_effect_key' => '', // Add a new attribute for the activation key ), $atts, 'fullpage'); // Convert string values to boolean values // ... (conversion code) ... // Process any nested shortcodes within the content $processed_content = do_shortcode($content); // Build the fullPage.js structure with the processed content $output = '
'; $output .= $processed_content; $output .= '
'; // Add the initialization script with the additional features // Use the unique instance ID in the script // Use the 'wp_footer' action to place the script at the end of the page add_action('wp_footer', function() use ($instance_id, $atts) { echo '<script> new fullpage("#' . $instance_id . '", { licenseKey: "xxxxxxxxxxxxx", fadingEffect: true, fadingEffectKey: "xxxxxxxxxxxxx", parallax: true, parallaxKey: "xxxxxxxxxxxxx", // Other configuration options }); </script>'; }, 100); // Use a late priority to ensure the script is placed after the FullPage.js library and extensions return $output; } add_shortcode('fullpage', 'css_scroll_master_fullpage_shortcode'); // Section shortcode function css_scroll_master_section_shortcode($atts, $content = null) { // Process any nested shortcodes within the content $processed_content = do_shortcode($content); // Build the section structure with the processed content $output = '
' . $processed_content . '
'; return $output; } add_shortcode('section', 'css_scroll_master_section_shortcode'); // Slide shortcode function css_scroll_master_slide_shortcode($atts, $content = null) { // Process any nested shortcodes within the content $processed_content = do_shortcode($content); // Build the slide structure with the processed content $output = '
' . $processed_content . '
'; return $output; } add_shortcode('slide', 'css_scroll_master_slide_shortcode'); // Hook the function to the admin_head and wp_head actions add_action('admin_head', 'css_scroll_master_add_css'); add_action('wp_head', 'css_scroll_master_add_css'); ?>

@alvarotrigo
Copy link
Owner

Can you try the links in your email again?
They should be working now.

We had issues with the DNS settings recently.

Also, you can find everything you need to know about the extensions and the activation on the fullpage.js documentation.

Here's the specific link:
https://alvarotrigo.com/fullPage/docs/#use-extensions

If there's any other link that is not working for you or the instructions sent to your email are not clear enough please let us know.

@alvarotrigo
Copy link
Owner

I can't see any issue raised on the last ticket, so if you still have any issues you can share with us your URL on the ticket and we'll take a look at it.

@FarmerJerry
Copy link
Author

Thanks, I'll try it again, I was just getting flustered because I've been at this for a few days to get the code to work right, and it was supposed to save me time. I've hard-coded the effects using CSS, but I didn't want to have to do that, so I'm hoping my plugin will finally work with the new license codes you provided. I'll let you know if it doesn't work.

@alvarotrigo
Copy link
Owner

@FarmerJerry I'm sorry to hear that.

Hopefully, things will work out now.
If you have any trouble please let us know and I'll check your website to make sure the licenses are all set correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants