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

Problem with MySQL error: site hacked?

Hello, I've installed 4.7 and then only applied the security patches up to 4.7.2 everything has been working fine for a month since the site began, but today I have this error message:

Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the 
right syntax to use near 's not used.\r\n\r\nAfter logging in, you will be redirected to % query: 

UPDATE cache SET data = 'a:353:{s:13:\"filter_html_1\";s:1:\"1\";s:18:\"node_options_forum\";a:1:{i:0;s:6:\"status\";}
s:17:\"menu_primary_menu\";s:1:\"2\";s:19:\"menu_secondary_menu\";s:1:\"2\";s:12:\"clean_url_ok\";i:1;s:19:\"
file_directory_temp\";b:0;s:9:\"site_name\";b:0;s:9:\"site_mail\";b:0;s:11:\"site_footer\";b:0;s:9:\"anonymous\";b:
0;s:14:\"site_frontpage\";b:0;s:9:\"clean_url\";b:0;s:8:\"site_403\";b:0;s:8:\"site_404\";b:0;s:11:\"error_level\";b:0;
s:14:\"watchdog_clear\";b:0;s:5:\"cache\";b:0;s:14:\"cache_lifetime\";b:0;s:19:\"file_directory_path\";b:0;s:14:\&qu 
in /homepages/26/d157900756/htdocs/includes/database.mysql.inc on line 120

And the site has lost all it's setup (primary menu, no index page, lots of "page not found)

You can see it live: http://www.senserely.com

I have to say that I wasn't using the CACHE and that I did nothing between when it worked and when it didn't.

I went in the database to WATCHDOG table and here's the last entries just before it began showing errors like above:

Display node file attachments to unregistered users, but require registration in order to download?

Hello All,

I'm trying to figure out how to display node file attachments (using standard upload.module) to unregistered users, but require registration in order to complete the download?

The following function looks like it displays the file download table in nodes, but I can't seem to figure out where it's called from (and where access permissions come into effect) for this function.

Anybody have any good ideas on how to accomplish this?

/**
 * Displays file attachments in table... from modules/upload.module
 */
function theme_upload_attachments($files) {
  $header = array(t('Attachment'), t('Size'));
  $rows = array();
  foreach ($files as $file) {
    if ($file->list) {
      $href = check_url(($file->fid ? file_create_url($file->filepath) : url(file_create_filename($file->filename, file_create_path()))));
      $text = check_plain($file->description ? $file->description : $file->filename);
      $rows[] = array(l($text, $href), format_size($file->filesize));
    }
  }
  if (count($rows)) {
    return theme('table', $header, $rows, array('id' => 'attachments'));
  }
}

Build site based on categories and access permissions

I'm new to Drupal and after experimenting for a few days, I've found myself needing some advice from the experts. I'm having trouble formulating my questions for the Drupal community, much less figuring out how to implement my ideas into a Drupal-run site. So, keeping that in mind, please bare with me.

Here goes ...

I want to run a school district website using a CMS. So far, it seems Drupal will be able to do what I want, yet I'm having trouble wrapping my brain around some concepts. Let me start with my needs ...

Different website sections available from the front page via a menu. Sections would be "District", "Schools", "Programs". etc. The sections may have subsections, for instance, "Schools" would list all the schools in the district and "Programs" would list different programs like "Gifted Education" and "Technology". Each of these subsections would have a separate manager ... the person who maintains the posts and menu items specific for their section. Each subsection would also have different contributors based on who they are (see users description below).

Users of the site would be Staff members, Students, Parents, Alumni, Community, and Other. Staff members also have sub-user categories of Teachers and Other Staff. Teachers, upon approval by admin after registering, will receive their own little space on the site that connects to the school or schools in which they teach. Within their space, they can post information about themselves, their classes, and conduct online courses to which Student users can subscribe (pending approval of the teacher) and contribute.

How should I build a site like this?

Hi,

I've been playing around with Drupal for a while, but I can't quite figure out how to put together the site that I want. I've started several times with lots of different modules, but I've never gotten it to work the way I wanted it, so I finally broke down and decided to cry for help. Help!

Here's what I want: I need to make a website for an association that is made up of several sections. The website should have a series of common static pages that explain things like what the association is all about, etc. For that I'm using the Page module. I also want to publish news items, I'll use Story.

Each of the sections that make up the association will get their own little corner of the site, where they can publish news items and keep a wiki-style repository of local information. For that last bit I was using the Book module, although it's not really very well suited.

The thing that screws me up every time is the access controls that I want. Each section will have one or more coordinators who should be able to contribute to the content of their section, and their section only. However, whatever they contribute must be aproved by one of the editors, which are common to all the sections. Any coordinator should be able to edit all content from their section (even if they weren't the original author), but all edits must be reviewed by one of the editors.

For this I was using taxonomy_access, but I have to grant administer nodes to the coordinator role (otherwise each coordinator can only edit his own submissions), which means that they can publish anything without editorial review.

Since installing webform, menu leaf is a square

First attempt to install a module. It went smoothly, except for an error saying that "variables" doesn't exist, i.e. this command from webform.mysql didn't work:

-- Setting default variables
INSERT INTO variable VALUES ('webform_version', 'a:2:{s:4:"text";s:5:"4.6.2";s:5:"build";i:462;}');

Probably should have prefixed 'webform_version' to match the Db name.

Menu based on state

I've looked over the previous posts but cannot find any solution/answer on point. I'm creating a custom menu. One of the items is Add Content. I'd like to find a way to not show this item to a user who cannot create any content.

For example, the Logout item only appears to a user who is logged in (obviously, since a user who isn't logged in cannot logout). How can I get other menu items to behave like that?

Thanks!

Pages

Subscribe with RSS Subscribe to RSS - Post installation