View previous topic :: View next topic |
Author |
Message |
teeeny
Joined: 22 Sep 2004 Posts: 3
|
Posted: Mon Oct 04, 2004 4:25 am Post subject: anyone ? |
|
|
does anybody have the customfield download link that's not dead ? i tried the other ones, but they're all dead. if you have it, that'd be nice.  |
|
Back to top |
|
 |
Sigg3
Joined: 03 Jul 2003 Posts: 773 Location: Oslo, Norway
|
|
Back to top |
|
 |
TheElementWithin
Joined: 05 Apr 2004 Posts: 4
|
Posted: Mon Oct 11, 2004 7:45 pm Post subject: |
|
|
I just sent it to Sigg3 to upload to his b2 site thing. Hopefully he will put it up soon and give you guys the link. |
|
Back to top |
|
 |
Sigg3
Joined: 03 Jul 2003 Posts: 773 Location: Oslo, Norway
|
|
Back to top |
|
 |
Sigg3
Joined: 03 Jul 2003 Posts: 773 Location: Oslo, Norway
|
|
Back to top |
|
 |
teeeny
Joined: 22 Sep 2004 Posts: 3
|
Posted: Fri Oct 15, 2004 12:18 am Post subject: |
|
|
THANKS !!  |
|
Back to top |
|
 |
urbneyes
Joined: 11 Jun 2004 Posts: 13 Location: OK
|
Posted: Fri Nov 26, 2004 8:11 pm Post subject: |
|
|
Thanks Sigg3. Your page is really helpful. That was SO simple to install. I had no issues. That was so easy, thanks!  _________________ Marlana Leigh
( HTTP://BROKENLOVE.ORG ) |
|
Back to top |
|
 |
Sigg3
Joined: 03 Jul 2003 Posts: 773 Location: Oslo, Norway
|
|
Back to top |
|
 |
Sigg3
Joined: 03 Jul 2003 Posts: 773 Location: Oslo, Norway
|
Posted: Mon Dec 20, 2004 1:43 pm Post subject: |
|
|
I got this:
Code: | function getcustomfield($name){ global $tableposts,$id; $sql = "SELECT ".$name." FROM ".$tableposts." where id = ".$id." LIMIT 1"; $result = mysql_query($sql); while ($row = mysql_fetch_array($result)){ $output = $row[$name]; } $output = convert_bbcode(convert_smilies(stripslashes($output))); echo $output; }
Parse error: parse error in /home/.sites/144/site218/web/gcp/b2-include/b2functions.php on line 1314 |
Line 1314 is the ending
}
The entire added functions are:
Code: | function createfield_form(){
?>
<script>
function checkInput(element) {
if (element.value == "dropdown") {
document.form.field_options.disabled=false;
} else {
document.form.field_options.disabled=true;
}
}
</script>
<table cellspacing="0" cellpadding="1" width="85%" border="0" bgcolor="#cccccc" align="center">
<td align="left">
<table cellspacing="0" cellpadding="15" width="100%" border="0"bgcolor="#ffffff" align="center">
<td align="left"> <strong>Create Custom Field</strong><br />
<br />
<form name="form" method="post" action="b2fields.php?action=create&id=1">
Field Name:
<input type="text" name="field_name"><br />
Field Type:
<select name="field_type" onchange="checkInput(this)">
<option value="input">Text box (small)</option>
<option value="textarea">Text box (large)</option>
<option value="dropdown">Dropdown/combo box</option>
<option value="checkbox">Checkbox</option>
</select></br>
Field Options:
<input type="text" name="field_options" value="Separate values with ;;" disabled><br />
<input type="submit" name="Submit" value="Create Field"></form> <br /><br /><br />
<b>Documentation</b><br />
<i>Field Name:</i> The name by which the custom field will be called. Please avoid putting spaces in the field name. Instead use underscores (_), or no spaces at all.<br />
<i>Field Type:</i> The type of form field that will be associated with it. 'Text box (small)' produces an <input type="text">, 'Text box (large)' produces a <textarea>, 'Dropdown/combo box' produces a <select> box, and 'Checkbox' produces an <input type="checkbox"> If you do not know what these are, some expirimentation will help.<br />
<i>Field Options:</i> This field will be disabled unless the field type is set to 'Dropdown/combo box'. Here you write down the names of the possible options that will populate the dropdown box, separated by 2 semicolons (;;). ie "Option 1;;Option 2;;Option 3;;Option 4"<br />
</td>
</table>
</td>
</table>
<?
}
function field_list(){
?>
<table cellspacing="0" cellpadding="1" width="85%" border="0" bgcolor="#cccccc" align="center">
<td align="left"> <table cellspacing="0" cellpadding="15" width="100%" border="0"bgcolor="#ffffff" align="center">
<td align="left"> <p><b>Custom Fields</b>
<table cellpadding="5" cellspacing="0">
<tr>
<td class="tabletoprow">ID</td>
<td class="tabletoprow">Category Name</td>
<td class="tabletoprow">Type</td>
<td class="tabletoprow"> </td>
<td class="tabletoprow"> </td>
<td class="tabletoprow"> </td>
</tr>
<?
$sql = "SELECT * FROM b2customfields";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)){
?>
<tr>
<td style="background-image: url('b2-img/b2button.gif');"><?php echo $row['field_id'] ?></td>
<td style="background-image: url('b2-img/b2button.gif');"><?php echo $row['field_name'] ?></td>
<td style="background-image: url('b2-img/b2button.gif');"><?php echo $row['field_type'] ?></td>
<td style="background-image: url('b2-img/b2button.gif');"><a href="b2fields.php?action=gencode&id=<?php echo $row['field_id'] ?>&name=<?php echo $row['field_name'] ?>">Generate Code</a></td>
<td style="background-image: url('b2-img/b2button.gif');"><a href="b2fields.php?action=edit&id=<?php echo $row['field_id'] ?>">Edit</a></td>
<td style="background-image: url('b2-img/b2button.gif');"><a href="b2fields.php?action=delete&id=<?php echo $row['field_id'] ?>">Delete</a></td>
</tr>
<?
}
?>
</table>
<p></p></td>
</table></td>
</table>
<br />
<?
} |
Think this could be related to the fact that I added this to a blog using another dbprefix than b2? gcp_ is the right one.
If so, what needs editing? _________________ VOTE for Female of the Year 2004 NOW! |
|
Back to top |
|
 |
|