Jump to content

html inserted into php page


TDZ

Recommended Posts

Hi guys, need a little php professional assistance here.  Running a dolphin 6.1.4 site with phpBB3.0.3 integrated.  Issue looking at deals with the Dolphin side of the site.  Need to insert some html into a php page, so it pulls the full css menu to the top of the page.  I know I can use the faq.php page to do this, by removing the FAQ information and inserting the new code into the page.  However, as a newbie to php, this is where I get lost.  Would appreciate a little help.  Here's the code form the page and also the new code that needs inserted into it:

 

<?

 

/***************************************************************************

*                            FAQ Manager Simple by OKWEB

*                              -----------------

*

* Tested with Dolphin 6.1, but the process is relatively the same for all versions

* Contact me through Expertzzz's if you have any questions at:

* http://www.expertzzz.com/ExpertsAccount/profile/okweb

*

***************************************************************************/

 

require_once( 'inc/header.inc.php' );

require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );

require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' );

require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' );

 

// --------------- page variables / login

 

$_page['name_index'] = 13;

$_page['css_name'] = 'faq.css';

 

 

if ( !( $logged['admin'] = member_auth( 1, false ) ) )

if ( !( $logged['member'] = member_auth( 0, false ) ) )

if ( !( $logged['aff'] = member_auth( 2, false )) )

$logged['moderator'] = member_auth( 3, false );

 

 

$_page['header'] = _t( "_FAQ_H", $site['title'] );

$_page['header_text'] = _t( "_FAQ_H1", $site['title'] );

 

// --------------- page components

 

$_ni = $_page['name_index'];

$_page_cont[$_ni]['page_main_code'] = PageCompPageMainCode();

 

// --------------- [END] page components

 

PageCode();

 

// --------------- page components functions

 

/**

* page code function

*/

function PageCompPageMainCode()

{

global $tmpl;

 

$faq_res = db_res( "SELECT * FROM `faq`" );

 

if ( !mysql_num_rows( $faq_res ) )

$out .= "<div class=\"no_links\">"._t( "_NO_LINKS" )."</div>\n";

 

else

{

while ( $faq_arr = mysql_fetch_array( $faq_res ) )

{

$faq_url = process_line_output( $faq_arr['URL'], 1000 );

$faq_title = process_line_output( $faq_arr['Title'] );

$faq_desc = process_html_output( $faq_arr['Description'] );

$out .= "<div class=\"faq_cont\">\n";

$out .= "<div class=\"clear_both\"></div>\n";

$out .= "<div class=\"faq_header\">";

 

                            $out .= "$faq_title</div>\n";

$out .= "<div class=\"faq_snippet\">$faq_desc</div>\n";

$out .= "<div class=\"clear_both\"></div></div>\n";

}

}

 

return $out;

}

 

?>

 

And the code I need to insert.  I've tried this a few times and just end up with either a menu error or a blank page:

 

<!-- Search Google -->

<center>

<div id="cse-search-results"></div>

<script type="text/javascript">

  var googleSearchIframeName = "cse-search-results";

  var googleSearchFormName = "cse-search-box";

  var googleSearchFrameWidth = 800;

  var googleSearchDomain = "www.google.com";

  var googleSearchPath = "/cse";

</script>

<script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></script>

 

</center>

<!-- Search Google -->

 

This is to create a Search Results Page.  Thanks in advance guys.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.