CiviCRM CiviMail Images are relative URLs - civicrm

When using the CiviMail WYSIWYG to compose a mailing, clicking the image insert option and then choosing "browse server", then uploading an image and inserting it - results in a broken image in the sent email because it uses a relative URL for the image.
Given that this is CiviMail and its sole purpose is to send out mailings, it seems like this behavior should be gleaned and replaced prior to sending? Is there an extension or way to configure it to fix this? I recall this being an issue previously, but had thought this was resolved for 4.5. Anyone know if there is a way to configure without jumping into the wysiwyg's direct code and overriding?

the editor is used in multiple locations besides civimail
Might want to check see if the wysiwyg editor has a setting that decides between relative vs absolute urls. might want to tweak that setting and see if it fixes things

Related

How to fix aws console problem (every code became oneline)

I closed my AWS console after the session ended.
And I reopened it and found every file in every directory became one line like below.
I think this is about a format setting problem or something.
How can I fix it
{"filter":false,"title":"guess.feature","tooltip":"/work/hw-sinatra-saas-hangperson/features/guess.feature","undoManager":{"mark":-1,"position":-1,"stack":[]},"ace":{"folds":[],"scrolltop":0,"scrollleft":0,"selection":{"start":{"row":15,"column":18},"end":{"row":15,"column":18},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":0},"timestamp":1556672503420,"hash":"7c932328fb87b63ff3d5362a56f39ca0bd38857a"}
The format of the text you've put above is known as JSON. It looks like your JSON has been consolidated to a one liner. There are plenty of free tools to format your JSON, infact most IDE's come with the feature to do it (and if not, there's always a plugin for it!). For now, you can use an online formatter: https://jsonformatter.curiousconcept.com/
Just remember to use the copy button and not try copy paste it yourself to avoid ruining the format due to the collapse/expand buttons.

og:image is not being fetched correctly by Facebook on liking or sharing

I'll try to be direct explaining my problem:
When liking/sharing an article from my website (http://www.radiopico.com) og:image does not work well (you can try with this url for example:http://www.radiopico.com/index.php?n=noticias&menu=noticias&id_noticia=14350)
on the debugger I always get the corret image url
It never shows the image
If I click the image I get a not found error.. if I copy the url and past it on the address bar I get the image
Sometimes it says image is to small.. it is wrong, because it is very larger then the minimum sizes facebook encourage. Also there is no ratio problem
When I try to post the address on facebook it never shows the picture
I have tried to add a time var (?T=...) after the address to make sure it is not caching
I have put multiple og:images.. still does not works.
I have read and tried all the "tricks" I find here (Stackoverdlow) or on google
Thanks for your support and best wishes on resolving this mystery
I notice that your image is technically not defined at 72 dpi, but rather at 300 dpi:
I cannot say definitively that this would cause your problem. Browsers are generally smart enough to display an image at 72 dpi (using the pixel dimensions) regardless of the "Resolution" that is defined within the image. However, it might be worth re-saving the image with the resolution correctly set for the web at 72dpi. Perhaps Facebook is getting confused about the image size due to the resolution setting.
Also, just to eliminate potential problems with the image, if you have Photoshop, use the Save for Web command to re-save the image, which will automatically define the re-saved image at 72dpi AND save it without a built-in preview, which you should always do for the web anyway to reduce file size. Then try again. Again, I'm not sure that these suggestions will work, but it seems like a good idea to eliminate the resolution, embedded preview and potential issues with the original file by re-saving.
Debuging your link
I see linter response is 206.
I don't know if it can help u but I've found this
check it out ;)

Color dark scheme for ColdFusion/Dreamweaver?

Is there anyone out there who has a dark color scheme for Dreamweaver (CS6) that includes coldFusion Code?
I was not able to find any and changing the colors by hand is really painful
Would be great if you could share one.
Tks
There are colour files for Dreamweaver, but I haven't found any that actually work with Coldfusiun. You can follow this guides process. It is a manual process, but it will tell you exactly what to change and as indicated by the latest update at the bottom it does work in CS6.
Copying from link in case link dies. Do note that you will have to go to the link to download the links.
Close Dreamweaver
Browse to: %APPDATA%\Adobe\Dreamweaver 9\Configuration\CodeColoring
Rename the Colors.xml file to something different – say Colors2.xml (This will be the file you go back to if you don’t like the new colour scheme)
Download and extract the the zip at the end of this article to the location you opened at point 2.
Open Dreamweaver and go to Edit/Preferences/Code Colouring and change the default background colour to #003
As a side note. If you are only using Dreamweaver to write Coldfusion, maybe you should consider looking at CFEclipse. I've found it to be much better than Dreamweaver at writing Coldfusion. Also it's built on top of Eclipse. Which has a plugin to change the colouring. It's also easier to change it manually.

What is the simplest way to view results at WebStorm?

Suppose I have changed html file. What is the best way to view results? Am I able to view results right in IDE (WebStorm)? Or I have to open browser by using Alt-F2?
WebStorm doesn't have internal preview, so you need to verify the results in the browser. You can keep it running and just switch to the window and refresh the page, in WebStorm you can enable an option to save files automatically on frame deactivation.
Update: see also the new instant preview feature.
Still doesn't as, of 5.0.2, allow for in IDE browser windows, you you have to keep flipping back to browser to see changes, which is a tad sucky. No idea why they don't have this, its not exactly an unknown technique.

Custom client app - need ability to control where documents are saved

Okay SO. I need some guidance. I apologize for the length of this post, but I need to provide some details:
I've got someone who is interested in me to do a small project for them. The application in general is a fairly straightforward employee record keeping / documentation app, but it makes pretty heavy use templated Word and Lotus documents. The idea is you select the employee “event” such as commendation, promotion, discipline, etc., and it loads the appropriate template doc and you fill it in from there, and later you can select an employee, view all the “events,” and view the individual documents associated with each one.
Thus, the app must know where the .docs are saved when the user is done.
The client actually has a v1 of this app (it doesn’t do any management of the files or anything, just launches Word/Lotus with the document you wanted to view in a new instance, presumably via a system() call.) We’ve not gotten into a detailed requirements phase, but the client and I agree that for this to really work, some kind of control over where the user saves the .doc’s to is going to be critical , because otherwise the app provides them with the new copy of the template doc, they "Save as" somewhere else, and the app is pointing to the blank copy it provided them with.
Obviously, I can’t think of a way to achieve “Save as” restriction/control in any way via just launching a new instance of Word. The client has the idea of an embedded Word/Lotus instance in the app with the template doc when you choose one, but I’ve few reservations with that:
I’ve dug around online and I’ve read that whichever version of Word I borrow MSWORD.OLB from will be the one the end user would require?
I’ve tried to do the MSDN example of embedding a Word doc from here, but as I’ve come to get used to, the MSDN example doesn’t even compile.
Even if I CAN figure out how to embed a .doc file into their application, I don’t know that I could control the use of “Save as…”
All of this STILL hasn’t touched on Lotus (!)
So… instinctively, I feel the embedded Word/Lotus thing has to be more work than it’s worth in the end.
So I’ve had a few other ideas brewing around.
One is looking into using Office XML (and if there’s a lotus equivalent), and get the user’s “inputs” separately and generate the document on the fly each time. I’m not particularly thrilled with that idea, but I think it COULD work, provided I just use old features to try and stay far backwards compatible.
Get user’s “inputs” separately and generate a document in HTML. Meh. Works, very cross platform and easily parsed and understood, but not good if you want to be able to email it to someone (who emails a .html? Works, yes, very unconventional which to the average user will throw them off) and even worse if you need to email it to someone for revisions…
Perhaps some kind of editable PDF? I know there are PDF libraries out there, and the more I stew on it, the more this sounds like the best option, though I’ve not done much work with PDFs and I don’t know how easily embeddable they are / what options one has when creating them. I know they can be save-disabled, I’ve had that with my bloody state taxes before.
I need some input here. Here’s the TLDR questions:
Is launching a new instance of Word for each .doc as bad as I feel, given user can “Save as” document wherever and then application is left pointing to a blank document?
Is trying to support embedded Word as big of a trouble as I feel like it is / more work than it’s worth / likely to cause problems with supporting multiple versions of Word? (Forward compatibility as well as currently released versions?)
What are thoughts on the PDF plan?
Any other good ideas?
Word does allow for programming some "Save" and "Save As" control via its object model. Any subroutines coded in VBA and placed into your Word template will be copied into all documents generated from that template. Additionally, most menu and Ribbon commands can be intercepted by creating a module containing subroutines named for the intercepted commands. So, for example, if a module contains a sub named FileSaveAs(), any code in that sub will be executed instead of the standard File|Save As command. Lastly, this code will replace Save As commands executed via keystroke, toolbar, menu, or Ribbon.
The code below will launch a dialog box to a predetermined path whenever a "Save" or "Save As" command is executed:
Sub FileSave()
ControlSaveLocation
End Sub
Sub FileSaveAs()
ControlSaveLocation
End Sub
Sub ControlSaveLocation()
Dim Directory As String
Directory = "C:\Documents\"
With Application.Dialogs(wdDialogFileSaveAs)
.Name = Directory
.Show
End With
End Sub
Hope this helps.