Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Codd

    (@ranjangoyal)

    Is it possible that I create a separate theme for blog…. if I create that how it be used as only one theme can be used?

    please help

    Thread Starter Codd

    (@ranjangoyal)

    In my theme only following files are getting used rest are blank:

    1. header.php
    2. footer.php
    3. style.css
    4. page.php

    Following is the code for page.php

    <?php get_header();?>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php the_content(); ?>
    <?php endwhile; endif; ?>

    <?php
    $pagename = $post->post_name;

    $page_id = get_the_ID();

    if($page_id == 135){
    //get_sidebar();
    }
    ?>

    <?php get_footer();?>

    5. functions php

    functions.php just has following two lines

    remove_filter( ‘the_content’, ‘wpautop’ );
    remove_filter( ‘the_excerpt’, ‘wpautop’ );

    I have created various pages in wordpress admin and placed text in posts

    I have used exec-php

    All posts are fetched and displayed in pages

    On doing

    define(‘WP_DEBUG’, true);

    I get errors like below

    Deprecated: Assigning the return value of new by reference is deprecated in D:\wamp\www\project\wp-content\plugins\exec-php\exec-php.php on line 22

    And after removing these errors, still its blank page

    thanks

    Thread Starter Codd

    (@ranjangoyal)

    I also tried other way round.

    Ist I activated sessions in WordPress and then I changed the following function:

    function wp_generate_auth_cookie($user_id, $expiration) {
    	$user = get_userdata($user_id);
    
    	$key = wp_hash($user->user_login . '|' . $expiration);
    	$hash = hash_hmac('md5', $user->user_login . '|' . $expiration, $key);
    
    	/********************************/
    	$_SESSION['userid'] = $user_id;
    	$_SESSION['user'] = $user->user_login;
    	/*******************************/
    
    	$cookie = $user->user_login . '|' . $expiration . '|' . $hash;
    
    	return apply_filters('auth_cookie', $cookie, $user_id, $expiration);
    }

    Code in between
    /********************************/
    /*******************************/
    is added by me and I am able to register sessions but these session variables are not visible on the cakephp side means on mainsite.

    any directions and any help is highly appreciated.

    Regards,
    Ranjan

    Thread Starter Codd

    (@ranjangoyal)

    In addition to the above, I also tried but never successful. Am I making a mistake here?

    $url = "http://site.com/demo/makeover/blog/forum/bb-login.php";
    $re = "http://site.com/demo/makeover/blog/";
    $_wp_http_referer = "/demo/makeover/blog/forum/bb-login.php";
    
    $curlPost = "user_login=".$username."&password=".$password."&re=".$re."&_wp_http_referer=".$_wp_http_referer;
    
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 10);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost);
    curl_exec($ch);
    curl_close($ch);
Viewing 4 replies - 1 through 4 (of 4 total)