Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: pagalbos del box'o paneleje

Parašė respect· 2012 Sau. 10 18:01:53
#1

Sveiki. Kaip iterpi i panele Facebook box'a? gaunu koda is cia http://developers.facebook.com/d.../like-box/ ir kaip padaryt kad rodytu?

Parašė Creatium· 2012 Sau. 10 18:01:25
#2

Žiūrėk ko prašo. Ten, jeigu neklystu, prašo dalį kodo dėt į headerį, dalį ten, kur nori, kad rodytų. Ar aš klystu? Jeigu ne, tai sudėk kur prašo. Antrą kodo dalį (kur reikia dėt į panelę) dėk tarp kabučių, tarkim:


opentable("panelės pavadinimas");
echo 'tavo facebook kodas';
closetable();

Parašė respect· 2012 Sau. 10 19:01:00
#3

galit pasakyt kur kelt ta pirma koda?


<?php
if (!defined("IN_FUSION")) { die("Access Denied"); }
 
define("THEME_WIDTH", "1000");
define("THEME_BULLET", "<img src='".THEME."images/bullet.gif' alt='' style='border:0' />");
 
require_once INCLUDES."theme_functions_include.php";
 
function render_page($license=false) {
 
	global $settings, $main_style;
 
	//Header
	echo "<table align='center' cellspacing='0' cellpadding='0' width='".THEME_WIDTH."'><tr>
	<td>
	<div class=\"tail-top\">
		<div class=\"tail-bottom\">
			<div id=\"main\">
				<div id=\"header\">
					<div class=\"row-1\">
						<ul class=\"top-nav\">
							<li><li>
												</ul>
					</div>
					<div class=\"row-2\">
						<div class=\"indent\">
							<a href=\"".BASEDIR."index.php\"><img alt=\"\" src=\"".THEME."images/logo2.png\" /></a>
						</div>
					</div>
					<div class=\"row-3\">
						<ul class=\"site-nav\">
							 ".showsublinks("","")."
						</ul>
					</div>
				</div>
	</td>
	</tr></table>";
 
	//Content
	echo "<table align='center' cellspacing='0' cellpadding='0' width='".THEME_WIDTH."' class='$main_style'><tr>";
	if (LEFT) { echo "<td class='side-border-left' valign='top'>".LEFT."</td>"; }
	echo "<td class='main-bg' valign='top'>
	              <div class=\"wrapper\">
						<div class=\"col-1\">
							<div class=\"section\">".U_CENTER.CONTENT.L_CENTER."</div></div></div></td>";
	if (RIGHT) { echo "<td class='side-border-right' valign='top'><div class=\"col-2\">
							<div class=\"section\">".RIGHT."</div></div></td>"; }
	echo "</tr></table>";
 
	//Footer
	echo "<table class='tail-bottom' align='center' cellspacing='0' cellpadding='0' width='100%'><tr>
	<td><div id=\"footer\">
					<div class=\"indent\">
						<div class=\"fleft\">Sukurta: &nbsp; Dariaus</div>
						<div class=\"fright\">"; if (!$license) { echo showcopyright()."<br /><br />"; } echo "</div>
					</div>
				</div></td>
	</tr></table>";
 
}
 
function render_news($subject, $news, $info) {
 
	echo "<table cellspacing='0' cellpadding='0' width='100%'><tr>
	<td><h2>".$subject."</h2></td>
	</tr>
	<tr>
	<td><p>".$info['cat_image'].$news."</p></td>
	</tr>
	<tr>
	<td align='center' class='news-footer'>"; 
	echo newsposter($info," &middot;").newsopts($info,"&middot;").itemoptions("N",$info['news_id']); echo "</td>
	</tr>
	</table>";
 
}
 
function render_article($subject, $article, $info) {
 
	echo "<table cellspacing='0' cellpadding='0' width='100%'><tr>
	<td><h2>".$subject."</h2></td>
	</tr>
	<tr>
	<td><p>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</p></td>
	</tr>
	<tr>
	<td align='center' class='news-footer'>"; 
	echo articleposter($info," &middot;").articleopts($info,"&middot;").itemoptions("A",$info['article_id']); echo "</td>
	</tr>
	</table>";
 
}
 
function opentable($title) {
 
	echo "<table cellspacing='0' cellpadding='0' width='100%'><tr>
	<td><h2>".$title."</h2></td>
	</tr>
	<tr>
	<td><p>";
 
}
 
function closetable() {
 
	echo "</p></td>
	</tr>
	</table>";
 
}
 
function openside($title, $collapse = false, $state = "on") {
 
	global $panel_collapse; $panel_collapse = $collapse;
 
	echo "<table cellpadding='0' cellspacing='0' width='100%' class='border'><tr>";
	echo "<td><h2>".$title."</h2></td>";
	if ($collapse == true) {
		$boxname = str_replace(" ", "", $title);
		echo "<td class='scapmain' align='right'>".panelbutton($state,$boxname)."</td>";
	}
	echo "</tr><tr>";
	echo "<td".($collapse == true ? " colspan='2'" : "")."><dl>";	
	if ($collapse == true) { echo panelstate($state, $boxname); }
 
}
 
function closeside($collapse = false) {
 
	global $panel_collapse;
 
	if ($panel_collapse == true) { echo "</div>"; }	
	echo "</dl></td></tr></table>";
 
}
?>

Parašė Creatium· 2012 Sau. 10 19:01:36
#4

O kur prašo kelt? Spėju, kad arba į apačią prašo kelt arba į headerį, tai tokiu atveju reiks redaguot vietą iš /templates/ aplankalo failų: header.php arba footer.php.

Parašė respect· 2012 Sau. 10 19:01:04
#5

nera cia tokiu header.php ; footer.php

Parašė Creatium· 2012 Sau. 10 20:01:09
#6

templates folderyje turi tikrai būti tie failai.

Parašė respect· 2012 Sau. 10 20:01:42
#7

oj atsiprasau, rasau.


<?php
/*-------------------------------------------------------+
| <span style="border-bottom: 1px dotted black;">PHP</span>-Fusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| <a href='http://www.php-fusion.co.uk/' target='_blank'><span style='color:005C5B'>http://www.php-fusion.co.uk/</span></a>
+--------------------------------------------------------+
| Filename: header.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at <a href='http://www.gnu.org/licenses/agpl.html.' target='_blank'><span style='color:005C5B'>www.gnu.org/licenses/agpl.html.</span></a> Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
 
require_once INCLUDES."output_handling_include.php";
require_once INCLUDES."header_includes.php";
require_once THEME."theme.php";
require_once THEMES."templates/render_functions.php";
 
if ($settings['maintenance'] == "1" && ((iMEMBER && $settings['maintenance_level'] == "1" 
	&& $userdata['user_id'] != "1") || ($settings['maintenance_level'] > $userdata['user_level'])
)) { 
	redirect(BASEDIR."maintenance.php");
 }
if (iMEMBER) { 
	$result = dbquery(
		"UPDATE ".DB_USERS." SET user_lastvisit='".time()."', user_ip='".USER_IP."', user_ip_type='".USER_IP_TYPE."'
		WHERE user_id='".$userdata['user_id']."'"
	); 
}
 
echo "<!DOCTYPE <span style="border-bottom: 1px dotted black;">html</span> PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\n";
echo "<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='".$locale['xml_lang']."' lang='".$locale['xml_lang']."'>\n";
echo "<head>\n<title>".$settings['sitename']."</title>\n";
echo "<meta http-equiv='Content-Type' content='text/html; charset=".$locale['charset']."' />\n";
echo "<meta name='description' content='".$settings['description']."' />\n";
echo "<meta name='keywords' content='".$settings['keywords']."' />\n";
echo "<link rel='stylesheet' href='".THEME."styles.css' type='text/css' media='screen' />\n";
if (file_exists(IMAGES."favicon.ico")) { echo "<link rel='shortcut icon' href='".IMAGES."favicon.ico' type='image/x-icon' />\n"; }
if (function_exists("get_head_tags")) { echo get_head_tags(); }
echo "<script type='text/javascript' src='".INCLUDES."jquery/jquery.js'></script>\n";
echo "<script type='text/javascript' src='".INCLUDES."jscript.js'></script>\n";
echo "</head>\n<body>\n";
 
require_once THEMES."templates/panels.php";
ob_start();
?>




o kodas kuri reikia ikelti yra:


<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/lt_LT/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>


Include the JavaScript SDK on your page once, ideally right after the opening <body> tag.

Parašė Creatium· 2012 Sau. 10 20:01:22
#8

Tai jeigu prašo dėt iškart po <body> tago atidarymo, tai ir dedam tenai:


<?php
/*-------------------------------------------------------+
| <span style="border-bottom: 1px dotted black;">PHP</span>-Fusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| <a href='http://www.php-fusion.co.uk/' target='_blank'><span style='color:005C5B'>http://www.php-fusion.co.uk/</span></a>
+--------------------------------------------------------+
| Filename: header.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at <a href='http://www.gnu.org/licenses/agpl.html.' target='_blank'><span style='color:005C5B'>www.gnu.org/licenses/agpl.html.</span></a> Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
 
if (!defined("IN_FUSION")) { die("Access Denied"); }
require_once INCLUDES."output_handling_include.php";
require_once INCLUDES."header_includes.php";
require_once THEME."theme.php";
require_once THEMES."templates/render_functions.php";
 
if ($settings['maintenance'] == "1" && ((iMEMBER && $settings['maintenance_level'] == "1" 
	&& $userdata['user_id'] != "1") || ($settings['maintenance_level'] > $userdata['user_level'])
)) { 
	redirect(BASEDIR."maintenance.php");
 }
 
if (iMEMBER) { 
	$result = dbquery(
		"UPDATE ".DB_USERS." SET user_lastvisit='".time()."', user_ip='".USER_IP."', user_ip_type='".USER_IP_TYPE."'
		WHERE user_id='".$userdata['user_id']."'"
	); 
}
 
 
echo "<!DOCTYPE <span style="border-bottom: 1px dotted black;">html</span> PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\n";
echo "<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='".$locale['xml_lang']."' lang='".$locale['xml_lang']."'>\n";
echo "<head>\n<title>".$settings['sitename']."</title>\n";
echo "<meta http-equiv='Content-Type' content='text/html; charset=".$locale['charset']."' />\n";
echo "<meta name='description' content='".$settings['description']."' />\n";
echo "<meta name='keywords' content='".$settings['keywords']."' />\n";
echo "<link rel='stylesheet' href='".THEME."styles.css' type='text/css' media='screen' />\n";
if (file_exists(IMAGES."favicon.ico")) { echo "<link rel='shortcut icon' href='".IMAGES."favicon.ico' type='image/x-icon' />\n"; }
if (function_exists("get_head_tags")) { echo get_head_tags(); }
echo "<script type='text/javascript' src='".INCLUDES."jquery/jquery.js'></script>\n";
echo "<script type='text/javascript' src='".INCLUDES."jscript.js'></script>\n";
echo "</head>\n<body>\n";
echo "<div id='fb-root'></div>
 
<script>(function(d, s, id) {
 
  var js, fjs = d.getElementsByTagName(s)[0];
 
  if (d.getElementById(id)) return;
 
  js = d.createElement(s); js.id = id;
 
  js.src = \"//connect.facebook.net/lt_LT/all.js#xfbml=1\";
 
  fjs.parentNode.insertBefore(js, fjs);
 
}(document, 'script', 'facebook-jssdk'));</script>\n";
 
require_once THEMES."templates/panels.php";
ob_start();
 
?>

Parašė respect· 2012 Sau. 10 20:01:23
#9

Aciu pavyko. Dabar kita problema, su i metimu i panele. sumetu viska:


openside("name");
  echo "<div class="fb-like-box" data-href="http://www.facebook.com/pages/Blakstien%C5%B3-Priauginimas-Dainora/325347320833157" data-width="200" data-height="500" data-show-faces="true" data-stream="false" data-header="true"></div>";
closeside();


ir gaunu errora:


Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/dainora/domains/blakstuke.lt/public_html/administration/panel_editor.php(150) : eval()'d code on line 2 

Parašė Creatium· 2012 Sau. 10 21:01:20
#10

Visus " pakeisk į ' (viengubas kabutes). Ir ateityje žinok, kad jeigu echo ""; yra su " (dvigubomis kabutėmis), tai turinys tur būtinai būti su ' (viengubomis kabutėmis).

Parašė avice· 2012 Sau. 10 22:01:05
#11

Kitas variantas:

?> Tavo <span style="border-bottom: 1px dotted black;">HTML</span> KODAS .... "" ;; ''' ;;;; '''' '; ' ' " " <?php

arba

    echo <<<HTML
    Tavo <span style="border-bottom: 1px dotted black;">html</span> kodas.... "" ;; ''' ;;;; '''' '; ' ' " "
    <span style="border-bottom: 1px dotted black;">HTML</span>;

Nesvarbu kokios kabutes dvigubos ar viengubos ;]

Parašė respect· 2012 Sau. 11 09:01:49
#12

Nekertu. Gal tiesiog galetum iterp sita koda, kad ji parases i paneles turiny jis iskarto veiktu?


<div class="fb-like-box" data-href="http://www.facebook.com/pages/Blakstien%C5%B3-Priauginimas-Dainora/325347320833157" data-width="200" data-height="500" data-show-faces="true" data-stream="false" data-header="true"></div>

Parašė Creatium· 2012 Sau. 11 10:01:14
#13

Viskas labai paprasta.

Prašom:


openside("Facebook");
echo "<div class='fb-like-box' data-href='http://www.facebook.com/pages/Blakstien%C5%B3-Priauginimas-Dainora/325347320833157' data-width='200' data-height='500' data-show-faces='true' data-stream='false' data-header='true'></div>";
closeside();

Parašė respect· 2012 Sau. 11 13:01:25
#14

opa veikia, aciu uz pagalba :)

Parašė Creatium· 2012 Sau. 11 13:01:33
#15

Nepamiršk pažymėti tinkamo atsakymo varnele :)

Parašė doviis· 2012 Spa. 7 16:10:00
#16

Kuriame faile reikia dėti tą antrą kodą ? panels.php ar per adminkę prisijungus į panelę įkrauti ?

Sutvarkyta

Redagavo doviis· 2012 Spa. 8 11:10:57