42 comments found

  • Bought between 100 and 499 items
  • Exclusive Author
  • Has been a member for 2-3 years
  • Spain
alerma Purchased

Hello! With echo $sbm->showform(); the page goes blank, but with the a href the script works perfect… any ideas? I’m using codeigniter and COOKIE session to bookmark. Thanks.

themac

hi,

ist the class included and initiated on the site where you’re calling showform() ?

are there any etries in the error_log

rgds
amc

alerma
alerma Purchased

Sure, I calling like <?php include("my-path/sbm.class.php"); $sbm = new SimpleBM("COOKIE",1); ?>

I just have this entry in the error_log:

PHP Parse error: syntax error, unexpected $end

themac

hmmm…

don’t think the parser error is from the class file – could you send me the non working file via email (I’ve contacted you right now via your profile page)

rgds
mac

  • Bought between 10 and 49 items
  • Has been a member for 2-3 years

Hi,

i have the following issue,

i have created a separate db for simpleBookmarks, i have connected to sql through sbm.class.php but is not writing the userid.

After i bookmark a page, the uid row is always (0), i checked everything and with echo i can get my users id and auth.

I am using the following code in my php page where i want to appear the bookmark button:

<?php $uid = $this->Auth->user('id');?>
<?php $auth = $this->Html->isAllowed($this->Auth->user('user_type_id'));?>
<?php 
include("/var/www/vhosts/mydomain/httpdocs/app/webroot/sbm/sbm.class.php");
$sbm = new SimpleBM($uid,$auth,$db);
?>
<script src="//mydomain/js/libs/1.9.0-jquery.min.js"></script>
<script type="text/javascript" src="//mydomain/sbm/sbm.min.js" id="sbmjs"></script>
<?php echo $sbm->showform("Simple Bookmark System"); ?>
themac

hi,

is (added echo ”......)

<?php $uid = $this->Auth->user('id');?>
<?php $auth = $this->Html->isAllowed($this->Auth->user('user_type_id'));?>
<?php 
include("/var/www/vhosts/mydomain/httpdocs/app/webroot/sbm/sbm.class.php");

echo "<hr />UID: $uid<br />AUTH: $auth<hr />";

$sbm = new SimpleBM($uid,$auth,$db);
?>
<script src="//mydomain/js/libs/1.9.0-jquery.min.js"></script>
<script type="text/javascript" src="//mydomain/sbm/sbm.min.js" id="sbmjs"></script>
<?php echo $sbm->showform("Simple Bookmark System"); ?>

displaying the expected values?

rgds
mac

Default-user

yes.

i tried also $sbm = new SimpleBM(15,1); with no luck again

themac

> yes
so an uid is displayed and the boolean for auth is set correct, right?
then new SimpleBM(15,1) would cause the same as you used the correct values :)
but there’s no $db given …

are you using the AJAX version, and if so: have you set the correct data in the sbm.ajax.php?

Default-user

Hi,

i am using a new database (not an existing one) so i set it like this

$sbm = new SimpleBM($uid,$auth);

is ajax.php i have not set anything

themac

when you’re using //mydomain/sbm/sbm.min.js and the showform method you have to setup your sbm.ajax.php

Default-user

i see there

$sbm = new SimpleBM($_SERVER["REMOTE_ADDR"],1);

how do i set it up ?

themac

it’s all the same, you have to deliver your $uid and $auth values if you don’t want to use the IP-Address for identification

but you could first try to make it work by removing

<script type="text/javascript" src="//mydomain/sbm/sbm.min.js" id="sbmjs"></script>

and if it’s work you can go on with the ajax version

btw. you can find out if ajax is used when there’s no page loading when bookmarking

and: it’s a bit strange that a zero is stored,hmmmm?

Default-user

i have remov it and is now is not sending anything to sql

<?php 
include("/var/www/vhosts/mydomain/httpdocs/app/webroot/sbm/sbm.class.php");
$uid = $this->Auth->user('id');
$auth = $this->Html->isAllowed($this->Auth->user('user_type_id'));
echo "<hr />UID: $uid<br />AUTH: $auth<hr />";
$sbm = new SimpleBM($uid,$auth);
?>
<script src="//mydomain/js/libs/1.9.0-jquery.min.js"></script>
<?php echo $sbm->showlink(); ?>
themac

could you send me the link to your installation?

by
by
by
by
by
by