Joomla! Discussion Forums



It is currently Mon Nov 23, 2009 3:43 am (All times are UTC )

 


Forum rules

Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 446 posts ]  Go to page 1, 2, 3, 4, 5 ... 15  Next
Author Message
Posted: Tue Feb 07, 2006 4:22 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Jan 08, 2006 12:10 pm
Posts: 70
I've got the hang of publishing components in different cells of my site depending on the position I choose for them in the module manager, but how do I got about choosing a position for my content pieces?

There doesn't seem to be a drop down menu for that and as a result, they all seem to appear in the mainbody part of my site, when I'd like to spread them around abit.

I'd be really greatful for any help.

Thanks,
Morty


Top
  E-mail  
 
Posted: Tue Feb 07, 2006 7:34 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Thu Aug 18, 2005 12:41 pm
Posts: 387
Location: Berlin / Germany
MortimerJazz wrote:
I've got the hang of publishing components in different cells of my site depending on the position I choose for them in the module manager, but how do I got about choosing a position for my content pieces?


I once wrote a module to do that. It should still work with 1.0.7. Download at:

http://forum.joomla.org/index.php/topic ... l#msg65751

http://forge.joomla.org/sf/frs/do/viewSummary/projects.content_item_module/frs

www.diebesteallerzeiten.de/module.html

http://diebesteallerzeiten.de/blog/joomla-content-item-module/

I recommend you ask questions on my website, I do not check the forum regularly (and yes, it still works with 1.0.13 and there is a version for 1.5, even if it hasn't all the features of the 1.0.x version)


Last edited by eike on Sun Dec 30, 2007 6:15 pm, edited 1 time in total.

Top
   
 
Posted: Tue Feb 07, 2006 8:00 pm 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Thu Aug 18, 2005 8:43 pm
Posts: 5759
Location: New York
I think you are confusing components and modules.

Modules are pieces that you manage the location of in the module manager.

Components are workhorses that do various things (produce and manage content, weblinks, etc) .

Many components have modules that basically present information produced by the component.
Components are shown (when they are--not all do)  in the mainbody.

So, newsflash is a module that presents items produced by com_content.

If you want to have content in a module you can copy newsflash and assign it to a new category and put the content you want to display in that category.

ALso,. you can always make a new module with some specific text that you want. For example I have a module that contains the text "Members of the MCS community are encouraged to register and login" that I have at various places.

_________________
Read your words before posting and think about how other people will read them.
Be polite. Be kind. Be constructive. Say thank you.
Freedom-Equality-Trust-Community-Collaboration-Usability
http://opensourcematters.org/index.php?Itemid=134


Top
   
 
Posted: Tue Feb 07, 2006 8:44 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Jan 08, 2006 12:10 pm
Posts: 70
So in order to post content elsewhere, I'm going to need to create a new module to put it in then?


Top
  E-mail  
 
Posted: Tue Feb 07, 2006 9:14 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Thu Aug 18, 2005 12:41 pm
Posts: 387
Location: Berlin / Germany
MortimerJazz wrote:
So in order to post content elsewhere, I'm going to need to create a new module to put it in then?


You could use the module I mentioned above. It takes the Id of a content item as parameter and displays the item a an assigned module position.

-- eike


Last edited by eike on Tue Feb 07, 2006 9:20 pm, edited 1 time in total.

Top
   
 
Posted: Tue Feb 07, 2006 11:01 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Jan 08, 2006 12:10 pm
Posts: 70
Thanks very much for that eike - I've downloaded it and it has installed fine.

Sorry for the obvious question, but in order to use it efficiently, do I need to link the content items to it through a menu?


Top
  E-mail  
 
Posted: Tue Feb 07, 2006 11:29 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Thu Aug 18, 2005 12:41 pm
Posts: 387
Location: Berlin / Germany
MortimerJazz wrote:
Thanks very much for that eike - I've downloaded it and it has installed fine.

Sorry for the obvious question, but in order to use it efficiently, do I need to link the content items to it through a menu?


Hey,

the module was broken :-( . I attached a fixed version. Just ftp it to your modules directory to overwrite the existing files (or un-install and re-install).

If you go to Modules and select mod_contentitem you will see as the last field for Parameters the field "Contentitem ID". There you enter the Id of the item to display  (you see the ID in the list of content items in content manager). Assign a position to the module and publish it and the item should be displayed in the module position.

I tested this with Joomla 1.0.7 and it worked for me. If it fails for you (don't know why it should) send the error message and I'll try and fix it.

-- eike

EDIT: REMOVED ATTACHED FILE, PLEASE USE THE VERSION FROM THE FORGE


Last edited by eike on Mon May 01, 2006 6:25 pm, edited 1 time in total.

Top
   
 
Posted: Wed Feb 08, 2006 9:09 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Jan 08, 2006 12:10 pm
Posts: 70
Thanks eike - that's excellent. It seems to be working fine. I'll need to sort out the borders and padding around the content, but I'm guessing that's all in the CSS.

One quick question though ... does it mean that I can only use this module once (i.e I'm not able to put two or three pieces of content in two or three different places) - I know I'm asking for the moon on a stick, but it was worth asking.

Thanks alot for your help and for answering this post - I really appreciate it.


Top
  E-mail  
 
Posted: Wed Feb 08, 2006 9:19 am 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Thu Aug 18, 2005 12:41 pm
Posts: 387
Location: Berlin / Germany
MortimerJazz wrote:
One quick question though ... does it mean that I can only use this module once (i.e I'm not able to put two or three pieces of content in two or three different places) - I know I'm asking for the moon on a stick, but it was worth asking.


You can copy the module (in the module manager check the box in front of mod_contentitem and hit "copy" in the upper right toolbar) and assign a different name, position and contentitem id to the copy.

Due to a typo in the code it is at the moment not possible to assign a css class to the module - you can enter it in the parameters but it won't be displayed. I will fix this as soon as possible.

-- eike

Edit: Attached file now has a version that uses the "Module Class Suffix" Parameter. Default classname is "mod_contentitem".



EDIT: REMOVED ATTACHED FILE, PLEASE USE THE VERSION FROM THE FORGE


Last edited by eike on Mon May 01, 2006 6:26 pm, edited 1 time in total.

Top
   
 
Posted: Tue Mar 21, 2006 11:24 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Tue Dec 13, 2005 9:56 pm
Posts: 73
Location: Oregon
Ah, you're a lifesaver, eike! Thanks a ton for this very handy little module!

_________________
- Bible Yellow Pages: http://www.bibleyp.com


Top
  E-mail  
 
Posted: Fri Mar 24, 2006 1:52 am 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Mon Mar 13, 2006 10:14 pm
Posts: 314
Location: Philly
:-* I just need to thank whoever created this. This solves so many problems for me. THANK YOU.  :-*

_________________
http://www.JoomlaSimple.com :: Home of the JoomlaSimple Administrator Handbook ::

It is hard enough to remember my opinions, without also remembering my reasons for them!

[Nietzsche]


Top
   
 
Posted: Fri Mar 24, 2006 1:07 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Thu Mar 02, 2006 8:35 am
Posts: 4
Is anybody aware of issues with Joomla! 1.0.8?

I get an error

Code:
Warning: Invalid argument supplied for foreach()

in /home/sed/haddingtonathletic.co.uk/modules/mod_contentitem.php on line 63


when I try to use this module


Last edited by RobSykes on Fri Mar 24, 2006 1:09 pm, edited 1 time in total.

Top
   
 
Posted: Fri Mar 24, 2006 1:19 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Thu Aug 18, 2005 12:41 pm
Posts: 387
Location: Berlin / Germany
RobSykes wrote:
Is anybody aware of issues with Joomla! 1.0.8?

I get an error

Code:
Warning: Invalid argument supplied for foreach()
in /home/sed/haddingtonathletic.co.uk/modules/mod_contentitem.php on line 63

when I try to use this module


I'll send a revised version sometime this afternoon. The foreach-loop is not necessary anyway, this is a leftover from something that I did not implement in the end.

-- eike


Top
   
 
Posted: Fri Mar 24, 2006 1:34 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Thu Mar 02, 2006 8:35 am
Posts: 4
eike wrote:

I'll send a revised version sometime this afternoon. The foreach-loop is not necessary anyway, this is a leftover from something that I did not implement in the end.

-- eike


Many thanks for the prompt reply - as it turns out the error is not with the module but with me  :-[

I wasn't using the latest version  >:(


Top
   
 
Posted: Fri Mar 24, 2006 1:37 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Thu Aug 18, 2005 12:41 pm
Posts: 387
Location: Berlin / Germany
No Problem. If you still want to loose the unnecessary foreach-loop (anda bit of other bogus code) you can use the attached version (tested with 1.0.8.).

EDIT: REMOVED ATTACHED FILE, PLEASE USE THE VERSION FROM THE FORGE


Last edited by eike on Mon May 01, 2006 6:26 pm, edited 1 time in total.

Top
   
 
Posted: Fri Mar 24, 2006 2:12 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Thu Mar 02, 2006 8:35 am
Posts: 4
eike wrote:
No Problem. If you still want to loose the unnecessary foreach-loop (anda bit of other bogus code) you can use the attached version (tested with 1.0.8.).


I shall do so.

This module is a little beauty. My colleagues have a pathological fear of the back-end, so this solution will be gratefully received.

Many Thanks


Top
   
 
Posted: Sat Mar 25, 2006 12:32 am 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Sat Nov 05, 2005 4:58 am
Posts: 66
eike wrote:
No Problem. If you still want to loose the unnecessary foreach-loop (anda bit of other bogus code) you can use the attached version (tested with 1.0.8.).

I have been looking for the mod in the extensions section but can't find it. Where do I get it from?
Thanks


Top
  E-mail  
 
Posted: Sat Mar 25, 2006 1:57 am 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Tue Dec 13, 2005 9:56 pm
Posts: 73
Location: Oregon
It's attached to eike's latest post (in this thread).

_________________
- Bible Yellow Pages: http://www.bibleyp.com


Top
  E-mail  
 
Posted: Sat Mar 25, 2006 2:00 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Mon Aug 22, 2005 3:31 pm
Posts: 114
Location: Norfolk, UK
Eike - thank you :)

gdude66 - the files aren't visible unless you log in - I had the same problem!

Hils

_________________
Start Joomla! the right way
http://lvsonline.com/online-joomla-class/


Top
   
 
Posted: Sat Mar 25, 2006 2:36 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Thu Aug 18, 2005 12:41 pm
Posts: 387
Location: Berlin / Germany
Since some people are actually using this I doodled around a bit more. You can now choose if you want to display a single item, all items from a category, all items from a section (all specified by id) or a number of content items, cats or sections specified by a comma separated list of ids. Plus I fixed the setting for the "Read more"-Link in the parameter tab, this works now.

This worked for me with Joomla 1.0.8. but has not been intensively tested. If any errors show up send me an email an I will try and fix it.



EDIT: REMOVED ATTACHED FILE, PLEASE USE THE VERSION FROM THE FORGE


Last edited by eike on Mon May 01, 2006 6:26 pm, edited 1 time in total.

Top
   
 
Posted: Sat Mar 25, 2006 3:00 pm 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Mon Sep 12, 2005 7:41 pm
Posts: 1374
Location: Glasgow - Scotland
Eike,

Ur a wee star my friend, can see loads of uses for this little module ;)

_________________
http://www.bulletprooftemplates.com/ - New Joomla 1.5 templates from an old Joomla head
If you don't know the answer don't be afraid to ask someone who does


Top
  E-mail  
 
Posted: Sat Mar 25, 2006 6:31 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sat Mar 18, 2006 4:24 pm
Posts: 34
Hey guys!

Great module!!!
I just have a small question.
I want to show the full text of an article (intro text and main text) in the module. So far I only get nothing or the read more link. Is there a little tweaking I could do???

all the best

Robert


Top
  E-mail  
 
Posted: Sat Mar 25, 2006 6:45 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Thu Aug 18, 2005 12:41 pm
Posts: 387
Location: Berlin / Germany
robs1412 wrote:
I just have a small question.
I want to show the full text of an article (intro text and main text) in the module. So far I only get nothing or the read more link. Is there a little tweaking I could do???


I will add a parameter to allow that (it Saturday evening here, so I'll do it tomorrow). I guess I will post download URL rather than attached files so that it's easier to always find the most recent version.

If you need this immediately you can replace the line (near the bottom of the mod_contentitem.php file) that says

Code:
$row->text = $row->introtext;


with

Code:
$row->text = $row->introtext . $row->fulltext


-- eike


Top
   
 
Posted: Sun Mar 26, 2006 12:08 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sat Mar 18, 2006 4:24 pm
Posts: 34
Wow!!!

It's working ... thank you so much.
I've actually lost quite a bit of sleep over this. My website requires a "print all" button, meaning I want to print multiple items at once. This doesn't work with a blog, but your module shows all the items I select (just what I need). Now all I need to figure out is how to put it into one content item so I can activate the print/pdf/e-mail function. Maybe with mosinline function, but I don't feel like testing that at 1 in the morning.
I know this is probably not what you had this module intended to do, and it's a bit twisted, but no one in the forum could figure out a different way to print a category/section without disabling the standard blog-options (introtext, read more)

Cheers,

Robert


Top
  E-mail  
 
Posted: Sun Mar 26, 2006 1:45 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Thu Aug 18, 2005 12:41 pm
Posts: 387
Location: Berlin / Germany
Hey Robs,

do you mind doing a little beta testing for me?

You'll find a new version of the module at http://www.pierstorff.com/joomla/mod_contentitem.zip.

There is a new parameter called "Merge Item". Like the name says it merges multiple content items into one, so you can make a pdf from multiple items at once (you have to set the parameter "show pdf button" to "yes" of course").

I'm afraid this is a bit of an ugly hack. The pdf function does not convert the screen output to pdf but it takes an id for a content item, retrieves that item from the database and outputs it as pdf. So to output the merged items as pdf I have to create a temporary content item first from the merged items. The module starts by dropping all previous temporary items which is a bit errorprone if many people use your site at once.

I'm afraid the print button doesn't work for merged items (and it will not be displayed in mgered view even if set to yes in parameters), but pdf support is still better than nothing I guess.

This worked for me on a local installation of Joomla 1.0.8. I have no idea  how it will behave "in the wild".

If it doesn't work for you can write me or file a big report at http://www.pierstorff.com/bugtracker (you have to choose the project "mod_contentitem" from the dropdown on the right. The Bugtracker is german by default aber soweit ich weiß ist das ist für dich kein Problem. To change the language you will have to register.)

In the Joomla database the fulltext field for content items is set up as "mediumtext". I don't know how many characters a mediumtext-Field can hold but if you merge to many articles a part will get cut off.

I will be pretty busy the next week so there will be no quick bugfixes  but I still would like to hear bug reports and feature requests (and I promise I'll clean up the code, it's a bit messy at the moment).

-- eike


Top
   
 
Posted: Sun Mar 26, 2006 2:13 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sat Mar 18, 2006 4:24 pm
Posts: 34
Hey Eike!!!

THANK YOU SO MUCH!!!
I have just installed it, and it seems to be working. (Joomla 1.08 with Apache Server)
I'll do some beta-testing and give you a detailed report.

all the best

Robert


Top
  E-mail  
 
Posted: Mon Mar 27, 2006 2:39 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Mar 20, 2006 9:25 am
Posts: 30
Hi, i seem to have a problem with the module when copying so i can use two different articles with it. Down to a function being re-declared...

Fatal error: Cannot redeclare createtemparticle() (previously declared in /usr/local/www/data-dist/Joomla/modules/mod_contentitem.php:108) in /usr/local/www/data-dist/Joomla/modules/mod_contentitem.php on line 108

Any thoughts?

Cheers

Ed


Top
   
 
Posted: Mon Mar 27, 2006 2:49 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Thu Aug 18, 2005 12:41 pm
Posts: 387
Location: Berlin / Germany
edlynn wrote:
Hi, i seem to have a problem with the module when copying so i can use two different articles with it. Down to a function being re-declared...

Fatal error: Cannot redeclare createtemparticle() (previously declared in /usr/local/www/data-dist/Joomla/modules/mod_contentitem.php:108) in /usr/local/www/data-dist/Joomla/modules/mod_contentitem.php on line 108

Any thoughts?

Cheers

Ed


Yes. Again, this was me being a bit stupid. I moved some module code into a function which will not work when the module is used more than once (because, as the error message says, I cannot declare the same function twice). I will fix this by the end of the week (or earlier when I have the time).

-- eike


Top
   
 
Posted: Mon Mar 27, 2006 4:23 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Thu Aug 18, 2005 12:41 pm
Posts: 387
Location: Berlin / Germany
This is fixed now (meaning it works for me - still requires testing). News files are under the same adress: http://www.pierstorff.com/joomla/mod_contentitem.zip.

Plus the Print-Button now works for merged content items, so you can print a category or section (titles of the items will be missing. I'll fix that soon). This seems to be a much sought-after feature.

Do not worry if a new content item shows up in the static content manager - the module creates a temporary item when you choose the "merge items"-option, else pdf and print wouldn't work.

Please note that simply replacing the mod_contentitem.php file will not suffice if you had the module installed before, there is now a subfolder with one additional file (if you use the installer there's no problem, else unzip all files/directories in the /module-directory).

General code quality is still lacking but I promise to clean up soon.

-- eike


Top
   
 
Posted: Mon Mar 27, 2006 8:29 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu Feb 16, 2006 12:26 am
Posts: 22
Location: Mazatlán, Mexico
Eike,

I like everybody else am very grateful that you've shared this module! Thanks a bunch!

I know you're busy, but wanted to share an error i'm getting.

The content is actually showing up correctly, but it's giving me error notices, so I thought I'd let you know.

I installed the most recent version (from the link in post #28), but after getting the error I actually tried a previous version and got the same error (with different line numbers).

The error is:
Notice: Undefined variable: page in C:\htdocs\ElRancho\www\modules\mod_contentitem.php on line 101
Notice: Undefined variable: option in C:\htdocs\ElRancho\www\modules\mod_contentitem.php on line 101
Notice: Undefined variable: ItemidCount in C:\htdocs\ElRancho\www\modules\mod_contentitem.php on line 101

I've now turned off the display of errors in the PHP configuration, so the errors no longer show up and I'm good to go.

I'm using joomla 1.08, with PHP 5.1.2.

Thanks again for your valuable contribution ot the community, and if I can help in any way to resolve this, let me know!

--Larry


Top
   
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 446 posts ]  Go to page 1, 2, 3, 4, 5 ... 15  Next

Quick reply

 



Who is online

Users browsing this forum: No registered users and 39 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group