Drupal is up and running but how do I ...?

installing shazamgallery

I've attempted to install shazamgallery, I uploaded the files to /shazamgallery
in myadmin, I click my database and select sql browse for the file click go and I get this error.

I've tried removing the <?php and various other combinations to no avail, its a shame because this addon seems to be the only one that suppports user galleries which is what I need.

(ignore the very top and very bottom php tags, its the only way I could display the whole code.)

<?php

Error
There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Unknown Punctuation String @ 10
STR: //
SQL: <?php
// $Id

function shazamgallery_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE IF NOT EXISTS shazamgallery (
nid int(10) UNSIGNED NOT NULL,
tid int(10) UNSIGNED NOT NULL,
gdefault int(10) UNSIGNED NOT NULL,
weight tinyint(3),
PRIMARY KEY (nid, tid)
) ENGINE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;")

SQL query:

<?php // $Id function shazamgallery_install() { switch ($GLOBALS['db_type']) { case 'mysql': case 'mysqli': db_query("CREATE TABLE IF NOT EXISTS shazamgallery ( nid int(10) UNSIGNED NOT NULL, tid int(10) UNSIGNED NOT NULL, gdefault int(10) UNSIGNED NOT NULL, weight tinyint(3), PRIMARY KEY (nid, tid) ) ENGINE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;")

How do i implement self-submitting forms?

i am making a mail form, pretty much its a dropdown list with multiple names, where a user can choose who tos end the email to, a small msg box, and off it goes. no need for from/subject, etc. however, i like to have this in a node, so it selfsubmits rather than use a php page outside of drupal. i like for slight error checking, so it makes sure a name was selected, and there is a message > 5 chars.

so far, i got this, and it doesnt work:


Fill out a brief message in the box bellow and hit the send button. Sales leads should be sent via the Salesmap. Remember, the sales person has no way of knowing who sent the message unless you include your name.

echo $_SERVER['PHP_SELF'] " method="post" name="frmMail" id="frmMail">

To:


Jon
...

Message:



<?php
if ( $_POST['frmMail'] )
{

$to = $_POST['optSalesman'];
$msg = $_POST['txtMsg'];
$headers = "From: Intranet \r\n";
$ret = mail($to,"MSG",$msg,$headers);
if ($ret)
echo "

Success!

";
else
echo "

Failure!

problem calling a form script from my account

I am writing a site for a company that would like a to give the users the option of emailing themselves private data about their account, a pin. I figured the logical place for this would be under the my account menu item so i wrote a module and implemented the hook_user function to output a form with a submit button and a hidden input field to send to my processing url. The url is a page written in php that processes the request and displays a confirmation that the data was emailed.

How to put up 'Image' to nodes woes...

What image module of what version should work with Drupal 4.7 since image module can not insert and what combination of other modules should be used with Image module?

current image.module.cvs gives this error
Fatal error: Call to undefined function: node_validate_title() in /home/modules/image/image.module on line 168

Theming Views Module... I didn´t get it yet...

Hi there!

After some research I´ve found some interesting stuff about the possibilities of the Views Module. My problem is that I don´t get how to configurate it to match my design.
I´ve found the very page where it is explained, but cannot understand:

Where are those themes (ie. views_view_VIEWNAME)
I understand that when it says "What a View Theme Should Do"... it is an example of code. Where should I put that code? Into a block or a page? Copying and pasting as a snippet?

Content by user. help me.

Hi,
I'm pretty green to drupal, so I'm having trouble creating a site where depending of the kind of user, he'll see a diferent front page. Not only that, but he'll only be allowed to search for content that his group is allowed to see.

So:

user A belongs to group X. when he visits my site he'll have a diferent front webpage than user B who belongs to group Z. The same goes for searches.

Any tips? Help? Anyone?

Pages

Subscribe with RSS Subscribe to RSS - Post installation