This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

story and flexinode permissions

Hi all,

I made a change to flexinode.module adding in "edit all $ctype->name content" and modifying flexinode_access() so that when flexinode is a wiki page, anyone with this permission can edit it as opposed to just the creator of the page.

Drupal & flash

Can you post it some examples of integration flash into Drupal.

No User Picture in Flatforum

Hello,

i have installed flatforum module and use the node-forum.tpl.php and template.php from http://www.drupalart.com/phpbb

It looks very nice, but the Avatar (User Picture) is not displayed.

In the node-forum.tpl.php is a line <?php print $picture ?>

I use Drupal 4.6.3 and the actually cvs from flatforum.

Do you know what the mistake is?

Link to the forum: http://www.stnetwork.de/forum

Problem with image.module

I've installed the Image.module, after adding galeries I posted new image into gallery. I've noticed that images and thumbnails are not displayed.
Have anybody solve that problem? (I read some topics but I still couldn't solve that and images/tumbnails aren't diplayed).

can't view image nodes inserted with img_assist as anonymous

Drupal: latest, updated by web host through cPanel (4.6.3)

If I insert an image with the img_assist module as "admin" user, the thumbnail and caption shows up in the node. However, if I click on the thumbnail or caption link to the full size image node as ANY other user besides ADMIN, I get a 403 access denied page. What I am trying to accomplish here is to have ANY sufficiently permissioned user upload and insert an image and have ANYONE visiting the site be able to see the thumbnail AND click on the link to view the full size image node.

Bug in custom phpTemplate

I'm using phpTemplate to run a news site (news.plu.edu). The problem that I'm having is that one of my pages is only desplaying ten items, and I can't seem to find the bug. If you visit this page (Campus News) you can see everything in action. The items in the gray box is where I need help. If more than ten items are assigned to this area, it will only show ten.

Allow me to explain how I think this should be working:

  1. page.tpl.php has a script that sends users to a different page template (see detection script below). I have verified that this is working correctly. So when a user request a page with "campus-news" in the URL they are sent to the campusnews.tpl.php file.
  2. campusnews.tpl.php has a script that grabs node items that match certain taxonomy requirements (see campusnews code below).
  3. template.php includes some custom variables for sorting term ids, these variables are used on the page templates to help filter node content (see template.php code below). Basically template.php provides campusnews.tpl.php with the term id's need to filter and show the proper content.
  4. Using flexinode I've created a custom content type called "campus news", and another called "campus news page".
  5. Within the taxonomy module I've created vocabulary and terms for categorizing campus news items by issue, and placement (see example below)
  6. Every campus news item is given taxonomy for assigning an issue date, and a placement (where it appears on the campus news page).
  7. Each campus news page is given a URL alias and an issue date.

Have I lost you yet? There might have been an easier way to do this, but I only had a week to get the site up and running. So what am I missing why am I only able to dispaly ten items in the gray box?

Detection Script in page.tpl.php. Sends users to the correct template.

// Check to see if the current page has an alias, use alias to match template
else {
	$url_real = $_GET["q"]; // Get the real URL
	$url_results = db_query("SELECT * FROM {url_alias}"); // Grab the list of aliases
	$url_alias = ""; // Initialize alias variable
	
	while ($url_data = db_fetch_object($url_results)) { 
		
		// If the the real URL matches an entry in the list of aliases
		if($url_data->src == $url_real){
			$url_alias = $url_data->dst; // Create alias to use for template check
		}
	}
	
	if ($url_alias != ""){
		
		// Split up alias information
		$arguments = explode('/', $url_alias); 

		// Issues
		if($arguments[0] == "issue"){
			// If argument 2 is empty then it's a home page
			if($arguments[2] == ""){
				include('home.tpl.php');
				return;
			}
			// News Release
			elseif($arguments[2] == "news"){
				include('news.tpl.php');
				return;
			}
			// Campus News
			elseif($arguments[2] == "campusnews"){
					include('campusnews.tpl.php');
					return;
			}
		}
		// PLU in the news
		elseif($arguments[0] == "pluinthenews"){
				include('pluinthenews.tpl.php');
				return;
		}
		// Classifieds
		elseif($arguments[0] == "classifieds"){
			include('classifieds.tpl.php');
			return;
		}
		// Events
		elseif($arguments[0] == "events"){
			include('events.tpl.php');
			return;
		}
		// Events
		elseif($arguments[0] == "archives"){
			include('archives.tpl.php');
			return;
		}
	}

News items script taken from campusnews.tpl.php (this code spits out the items for the gray box)


/* GET ITEMS
- Takes the page term id, and the termid of the desired position (feature, news item etc.)
- Returns a sorted array (by date) of node title, teaser, link, and date
*/
function getItems ($pagetid, $termtid){

// Get Items
$tax = array($pagetid, $termtid);
$operator = "and";
$result = taxonomy_select_nodes($tax, $operator);
while ($obj = db_fetch_object($result)) {
$node = node_load(array('nid' => $obj->nid));
$items[] = array('title'=>$node->title, 'description'=>$node->flexinode_13, 'extended'=>$node->flexinode_14, 'medium'=>$node->flexinode_27->filepath, 'link'=>"node/". $node->nid, 'date'=>$node->created);
}

if ($items != ''){
// Sort items by date (oldest goes to bottom)
foreach ($items as $key => $row) {
$date[$key] = $row["date"];
}
array_multisort($date, SORT_DESC, $items);

}

return $items;
}

$newsItems = getItems($pagetid, $campusnewsitemtid);

if($newsItems != ''){

foreach($newsItems as $value){

echo "

";

// If there's a medium image show it
if($value['medium'] != ''){
echo "Only local images are allowed.";
}

echo "

" . $value['title'] . "

";
echo "

". $value['description'] ."

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions