Solved

Drupal - Google Map

Posted on 2013-05-09
13
353 Views
Last Modified: 2013-05-11
I can't make this work.

I build a block. See attached san_antonio_block.txt. This is the EXACT content of the block in FULL HTML.

Then I look at it. It looks like the attached loc_page_rendering.jpg.

Obviously, I want the text in the left most column aligned to the top; I CANNOT make it happen. I really don't want to use tables, I used divs with flush left & right, it (Drupal) completly erased all the content. At least in this case it kind of get's it.

When I reopen the block, Drupal has changed it & eliminated the "valign="top" on the left table column. In addition, it wipes out the following from the Google map.

<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src=

I have to put that back in every time.

Can someone help?

Thanks
san-antonio-block.txt
loc-page-render.jpg
0
Comment
Question by:Richard Korts
  • 7
  • 3
  • 3
13 Comments
 
LVL 13

Accepted Solution

by:
Arrow_1 earned 500 total points
Comment Utility
The best way to do it would probably be to eliminate the table, then wrap your iframe in div tags and float that div to the right. If you do an inline style directly in the div, then you'll have to use the PHP filter rather than the Full HTML filter. The Full HTML filter removes some things like inline styles, while the PHP filter does not. If you don't see an option for the PHP filter, you'll need to enable the php filter module.
0
 
LVL 17

Expert Comment

by:nanharbison
Comment Utility
Have you set the text format to Full HTML? It's the first drop down box under where you add the content.
0
 

Author Comment

by:Richard Korts
Comment Utility
To all,

When I open the block to edit, it appears as attached. Note that FULL HTML is selected in the dropdown. The <iframe ... tag is eliminated as is the <td valign="top">. I switch to plain text editor, reapply those things & save. It does not work. I will try the php Filter.

If I can figure put how to do it.
0
 

Author Comment

by:Richard Korts
Comment Utility
To arrow_1

I found no module PHP Filter. I did Google search, found this: http://drupal.org/project/viewsphpfilter

I downloaded the gz version, tried to install as a new module,

It gives me the attached.

Help!!
cant-install-phpfilter.jpg
0
 
LVL 13

Expert Comment

by:Arrow_1
Comment Utility
That's not the correct module... The one you need already comes with Drupal. It's in the list of core modules on the modules page.
0
 

Author Comment

by:Richard Korts
Comment Utility
To all,

I found the PHP Filter & enabled it & set permissions.

Result still the same. http://rkassoc.org/amc/content/san-antonio

It DOES now keep the html formatting (valign="top" & iframe). The iframe looks good, the rest the same.

I'll try with styled divs.

FYI, the problem with all this is it takes days to do a simple page; every time I delve into this it presents new challenges.  I have heard that once you learn it, Drupal makes it easy.

I could have done all 8 locations with maps PERFECTLY formatted in the time spent so far with one not done.

I am once again 2 inches from trashing Drupal & doing this the "old fashioned" way.
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:Richard Korts
Comment Utility
To all,

Can I include css styles in a block like styles can be included in a normal html page?

Like in the attached?
div-test.htm
0
 
LVL 13

Expert Comment

by:Arrow_1
Comment Utility
Yes... Just be sure to use the php filter.
0
 

Author Comment

by:Richard Korts
Comment Utility
Arrow_1

I did it & it looks like this: http://rkassoc.org/amc/content/san-antonio

I'm guessing it's all the <style> stuff that cause all the extra spacing at the top? Do you think so?

I can make all that in-line; what a pain.

Also, I THINK I know how to add my own css file in this theme; I MIGHT try that first.

Thanks.
0
 

Author Closing Comment

by:Richard Korts
Comment Utility
It WORKS!!

I'm stunned!!
0
 
LVL 17

Expert Comment

by:nanharbison
Comment Utility
What works? Your own CSS?
0
 

Author Comment

by:Richard Korts
Comment Utility
Yes, my own css & redoing the entire page using divs instead of tables,

The Theme developers suggested doing it like this, which I did (Option 1):
in case you would add new css file in to the theme. I did option 1 because 2 didn't seem to work (yesterday). FYI, this guy had the wrong location for the php file but I found it.

OPTION #1

open /sites/all/themes/centum/templates.php
add this code line
drupal_add_css($theme_path . '/css/local.css');

underneath of

drupal_add_css($theme_path . '/css/centum.css');

OPTION #2:
1/ in /sites/all/themes/centum/centum.info add this

stylesheets[all][] = css/local.css

so file local.css you must save under "css"
2/ follow the URL http://your-site.com/admin/config/development/performance hit "clear all caches"

I hope this helps,

Best regards

Toan
0
 
LVL 17

Expert Comment

by:nanharbison
Comment Utility
This way of adding your own CSS must be some proprietary thing with with theme. I have never had a problem with doing it the way I suggested.
The problem now is if there is an update to this theme, and you use it, you will lose all of your changes. So be careful with that.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This article is for those that are having major problems with users upload files such as pictures to their profile. The solution is simple and has to do with correcting the directory paths. With some experimenting and testing i got it fixed. Note…
RTL (right to left) web applications aiming for audiences speaking languages like Hebrew or Arabic, are generally more complicated than the same applications aiming for audiences speaking Latin based languages. The main difference lies of course …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now