Part of the EllisLab Network
pMachine Pro has been replaced by ExpressionEngine, our full featured web publishing solution. Please consider upgrading.
You can download pMachine Pro here: Download pMachine Pro  |  Download Language Packs
   
 
Placing text OVER an image in a pBlock/entry? 
Posted: 19 June 2006 02:38 PM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  169
Joined  2003-02-21

I am setting up some pBlocks and would LOVE to set up some code that turns the image into a background image so the text in my pBlock sits ON TOP of the image in the same pBlock.

Does anyone know if this is possible and how to do this in a way that is non-computer savvy friendly for my clients????

Thanks!
Robin

Profile
 
 
Posted: 19 June 2006 06:01 PM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRank
Total Posts:  2170
Joined  2002-12-06

Hmm...I just did something similar using EE.  Try something along these lines:

<div style="<?php static_pblock("YourGroup","YourPBlockImage");?>">

<?php static_pblock("YourGroup","YourPBlockText");?>

<div>

Uh oh, just re-read your message.  Both the text and image in the same pBlock seems like it would require more HTML in the pBlock which isn’t non-tech friendly.  Sure you can’t seperate them into seperate pBlocks?

Uhg....used to be I had trouble wrapping my head around EE from pMPro.  Now I’m having a hard time going backwards.  pBlocks don’t seem inherently “client friendly”...maybe look into using a weblog instead, with one of the custom fields storing the image?

 Signature 

Train-ee.com - Hosting the 1st EE Classroom Training Sept. 9-12 in Holland, MI USA. Register Now!

Profile
 
 
Posted: 19 June 2006 06:14 PM   [ Ignore ]   [ # 2 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  169
Joined  2003-02-21

Okay… well… Since I can’t use HTML in a pBlock, which I knew but you reminded me of, I am wondering if there is some sort of text or wording or CSS class that I can incorporate into the ... tag that I place in my pBlock. This should be allowed - I assume smile

I learn something new about CSS everyday so, a point in the right direction might help me narrow this down.
I am trying to avoid having to place the text directly onto the image making it part of that actual image. Makes it less user-friendly for someone who doesn’t know how to edit graphics or images via Photoshop - etc.

Thanks for your help…

Robin

Profile
 
 
Posted: 19 June 2006 06:32 PM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRank
Total Posts:  2170
Joined  2002-12-06

HTML in pBlocks?  Sure you can.  It’s pmPro tags that you can’t put in pBlocks.  You could put all of this into one pblock:

<div style="background-image: url(http://www.yoursitehere.com/path/your_image.jpg); background-repeat: no-repeat;">
Your Text here
</div>

It just has to have more HTML due to having both the image and text.  With seperate pBlocks the HTML could go in the template instead.

 Signature 

Train-ee.com - Hosting the 1st EE Classroom Training Sept. 9-12 in Holland, MI USA. Register Now!

Profile
 
 
Posted: 19 June 2006 06:41 PM   [ Ignore ]   [ # 4 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  169
Joined  2003-02-21

hmmm… well, I think that if I told my client that every time they wanted to add another image/member to the pBlock and have the text over top of it they will need to type out this code I would get some really confused looks. Trying to eliminate myself in the editing process as much as possible while maintaining the appearance of the site. I was hoping for some way to edit the img src code that gets inserted when you upload the image/file to the server using the control panel.

Guess I’m kind of out of luck here.... If you think of anything else please let me know. I really appreciate your help and ideas with this Michael smile

Robin

Profile
 
 
Posted: 19 June 2006 06:46 PM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
RankRankRankRank
Total Posts:  2170
Joined  2002-12-06

Yeah...kind of figured that would be the case.  I never put clients into the pBlocks section at all.

What are these images, and how are they part of the page?  Knowing that will help generate some options (I’m hoping)…

Edit - the text that pM puts in can be edited—hit the red arrow to open the file upload box, then hit the “preferences” link.  I’m not seeing how additional CSS is going to help in this case, however.

 Signature 

Train-ee.com - Hosting the 1st EE Classroom Training Sept. 9-12 in Holland, MI USA. Register Now!

Profile
 
 
Posted: 19 June 2006 06:56 PM   [ Ignore ]   [ # 6 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  169
Joined  2003-02-21

Well, this is a site for a recording studio. I want to create a place on the home page where an image of the artist rotates every time the page is refreshed. I had the idea of having the image sit in the background and placing the artist’s name and whatever other info over the image, which would also act as a hyperlink to the artist’s section on the site.

The whole random idea is what made me move toward the pBlock idea. I know that I can change the file upload preferences in the file upload manager. The problem is that I am not 100% confident when it comes to code or code-type issues. It’s a lot of trial and error for me. I lean more on the design side than the coding side smile

Is there some simple wording/text that can be inserted into the blahblahblah… tag that will allow the image to sit behind the text??
Maybe you have some other simple resolution ideas to this scenario… I am TOTALLY open!! Just trying to make it interesting on the viewers side and as simple as possible on the client side… you know.

I learn something new every day ... love that part of it.

Thanks,
Robin

Profile
 
 
Posted: 19 June 2006 07:27 PM   [ Ignore ]   [ # 7 ]  
Moderator
Avatar
RankRankRankRank
Total Posts:  2170
Joined  2002-12-06

Well...it’s late..and all I can think of is:

- Look for a php script that will do this outside of pMPro.  More than likely this is going to be based off some kind of text file, which isn’t client-friendly either.

or

- Do the site in ExpressionEngine instead...wink Not what you want to hear, but true - this would be a no-brainer in EE.

 Signature 

Train-ee.com - Hosting the 1st EE Classroom Training Sept. 9-12 in Holland, MI USA. Register Now!

Profile
 
 
Posted: 19 June 2006 07:32 PM   [ Ignore ]   [ # 8 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  169
Joined  2003-02-21

Well Michael,

Thanks for all of your suggestions. I really appreciate the feedback and support! Don’t have the funds for the actually full version of EE and last time I tried to use the free version I was not able to open it up for some reason so I gave up smile

Have a great night and thanks again,
Robin

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 233, on December 18, 2007 12:04 AM
Total Registered Members: 60703 Total Logged-in Users: 0
Total Topics: 73143 Total Anonymous Users: 0
Total Replies: 394499 Total Guests: 35
Total Posts: 467642    
Members ( View Memberlist )
Active Members: